Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build faild in Windows #77

Open
XiaoPb opened this issue Feb 8, 2025 · 2 comments
Open

Build faild in Windows #77

XiaoPb opened this issue Feb 8, 2025 · 2 comments

Comments

@XiaoPb
Copy link

XiaoPb commented Feb 8, 2025

Hi
Directly compiling with cmake in win will result in the message 'glob. h' not being found, but no calls using 'glob. h' will be seen.

G:\Code\lvgl\lv_port_pc_vscode\main\src\main.c:18:10: fatal error: glob.h: No such file or directory
   18 | #include "glob.h"
      |          ^~~~~~~~

After commenting on 'glob. h', a link error will occur. The compilation chain is "GNU 13.1.0 for 'D:/CompilationTools/mingw64/bin/gcc.exe' ".

D:/CompilationTools/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/CompilationTools/mingw64/x86_64-w64-mingw32/lib/libSDL2main.a(SDL_windows_main.o): in function `main_getcmdline':
/Users/valve/release/SDL2/SDL2-2.28.4-source/foo-x64/../src/main/windows/SDL_windows_main.c:80: undefined reference to `SDL_main'

Are you adding support for Windows?
If needed now, what modifications would need to be made to enable SDL2 to be linked properly?

@StarryPortrait
Copy link

Did it work for you? I'm using an environment configured with MSYS2 and I've encountered the same problem. After I replaced #include <glob.h> with #include <SDL2/SDL.h>, the compilation passed.

@edsonbrusque
Copy link

@StarryPortrait., that was the final missing link in my project.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants