I have written a small game in C using SDL2. It compiles, assembles and links just fine, no errors or warning. However when I try to build it under windows, it fist failed because I have lacked the header files. I have downloaded and extracted the the development libraries for MinGW. I have told gcc to use search for the headers, and it compiles and assembles as expected. But it fails to link. Then I added the the following to the gcc command
-LD:\SDL2-2.0.8\x86_64-w64-mingw32\lib -lmingw32 -lSDL2main -lSDL2
Now the complete linking commad looks like this
gcc -ID:\SDL2-2.0.8\x86_64-w64-mingw32\lib -LD:\SDL2-2.0.8\x86_64-w64-mingw32\lib -lmingw32 -lSDL2main -lSDL2 *.o
And yet it gives me undefined reference errors.
PS:If You want to see the source code for some reason, You can find it here.