Solved linux mint - Qt Creator "error: libglfw3 development package not found"
-
I've run
sudo apt install libglfw3-dev
and the program recognizes#include <GLFW/glfw3.h>
, but I can't figure out how to link the library. I could downgrade to glfw2, but that's not a permanent solution. My project uses qmake, and I'm run Linux Mint 18. -
The solution was to use
unix: PKGCONFIG += glfw3
. I had triedlibglfw3
,libglfw
, andlibgfw3-dev
. -
@sotrh Please read http://doc.qt.io/qt-5/qmake-project-files.html#declaring-other-libraries
This is an example how to add a library in .pro file:LIBS += -L/usr/local/lib -lmath
-
I added the following lines separately then together into the .pro file, but the error persists.
LIBS += -L/urs/local/lib -glfw3 INCLUDEPATH = /usr/include
-
The solution was to use
unix: PKGCONFIG += glfw3
. I had triedlibglfw3
,libglfw
, andlibgfw3-dev
.