I am using Code :: Blocks, which is my code:
#include "SDL2/SDL.h" int main(int argc, char* args[]) { SDL_Init( SDL_INIT_EVERYTHING ); SDL_Quit(); return 0; }
I build as:
mingw32-g++.exe -o C:\..\main.exe C:\..\main.o -lmingw32 -lSDL2main -lSDL2
And having received this:
undefined reference to "SDL_Init" undefined reference to "SDL_Quit"
I am sure that the linker will find the cause of the libs if I change them to something random, which it complains “cannot find anything”.
c ++ linker codeblocks sdl
user2535583
source share