Error: Cannot find -lSDL2
-
@jsulm Yeah I want to link dynamically.
I tried this:
win32:LIBS += C:\Users\admin\Documents\SDL2-2.28.5\i686-w64-mingw32\lib\*.lib
Now the error is this:
:-1: error: cannot find C:\Users\admin\Documents\SDL2-2.28.5\i686-w64-mingw32\lib*.lib: Invalid argument
-
@ajcdev said in Error: Cannot find -lSDL2:
win32:LIBS += C:\Users\admin\Documents\SDL2-2.28.5\i686-w64-mingw32\lib*.lib
What is this please?! You have to put the file name of your library instead of *.lib...
Are you using MinGW compiler?
-
-
@ajcdev said in Error: Cannot find -lSDL2:
Now it can't detect the SDL2 library itself
What does this mean? What exactly happens if you try to link the static version?
-
win32:LIBS += "C:\Users\admin\Documents\SDL2-2.28.5\i686-w64-mingw32\lib\libSDL2.a"
So this is what I used since there's no .lib files in the SDL2 MingW library. What happens is that my SDL2 codes get an error that they become undefined.
aerodesk.cpp:16: error: undefined reference to `SDL_Init'
-
@ajcdev Since your Qt version is 64bit you must also link against the 64bit sdl lib.
-
@Christian-Ehrlicher I'm not sure how you do that. Do I need to add another library for SDL2 for this?
-
There is also a64 bit version in the dev zip file. Adjust your path accordingly.
-