Originally Posted by
Salem
Show us the command line you used.
Also try (on a program which does link successfully) a command like this
g++ -v prog.cpp
This will make the compile driver print out all sorts of detailed information about the various compilation steps, including for example the exact syntax for -L paths on your system.
Code:
g++ -std=c++11 main.cpp -o main.exe -L/lib -lSDL2 -SDL2main
^this one gives me an error that says it cannot find SDL2 and SDL2main.
Code:
g++ -std=c++11 main.cpp -o main.exe -L. -lSDL2 -lSDL2main
^this one works if I move my SDL2 and SDL2main files into a directory where my main.cpp is.
Also, I get an warning message, "Warning: corrupt .drectve at the end of def file"
but I think this is related to SDL.
And for the -v, there were too many messages so I couldn't read them all.