Linux - How to link with SDL2 SO file?
-
I followed the steps at
https://doc.qt.io/qtcreator/creator-project-qmake-libraries.htmlto link to OpenGL, libpng, libjpeg, but I am unable to link to SDL2 since the file does not end with .SO
The file name in the case of SDL2 is
/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0and the add file dialog filter has *lib, *.a, *.so
-
You can edit the qmake .pro file manually, .e.g add a line like this:
LIBS += /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0@hskoglund said in Linux - How to link with SDL2 SO file?:
LIBS += /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
Should be
LIBS += -L/usr/lib/x86_64-linux-gnu -lSDL2-2.0
on Linux. -
Actually, it looks like it wants
LIBS += -lSDL2and so, the above compiled and runs.
-
S stretchthebits has marked this topic as solved on