You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forgive as I am new to C and just messing around breaking things as I learn.
Is it possible to run the demo on windows? It seems the compiler does not like the SDL2 library.
./build.sh: line 13: sdl2-config: command not found
main.c:1:10: fatal error: SDL2/SDL.h: No such file or directory
1 | #include <SDL2/SDL.h>
| ^~~~~~~~~~~~
I have tried downloading the SDL2 library and including but I cannot seem to get this to work. Would anyone be kind enough to instruct me how to get this to work?
The text was updated successfully, but these errors were encountered:
Use -i with your compiler to allow it to see the headers. these are .h are include/ .You will then need to link the library using -l which are under /lib I think. Things may take a while to understand but it will eventually make sense. Here is an example build command using the visual studio compiler.
cl demo\main.c demo\renderer.c -I SDL2-2.0.14\include -I src\ SDL2-2.0.14\lib\x64\SDL2.lib SDL2-2.0.14\lib\x64\SDL2main.lib opengl32.lib
Download A recent version of SDL2 here, SDL2-devel-* will be easier since you don't need to compile them. Post again if you get more specific errors, I have encountered some in the past. https://github.com/libsdl-org/SDL/releases
Forgive as I am new to C and just messing around breaking things as I learn.
Is it possible to run the demo on windows? It seems the compiler does not like the SDL2 library.
I have tried downloading the SDL2 library and including but I cannot seem to get this to work. Would anyone be kind enough to instruct me how to get this to work?
The text was updated successfully, but these errors were encountered: