Qt creator Adding external library (still: Cannot open include file: 'GL/glew.h')
-
wrote on 7 Feb 2013, 03:26 last edited by
I followed the instruction:
In the Projects pane, open the project file (.pro).
Right-click in the code editor to open the context menu and select Add Library....
!http://www.qtcentre.org/attachment.php?attachmentid=8687&d=1360207416(Add Library)!Then the following lines were added into the pro file:
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/D:/OpenGL/glew-1.5.4/lib/ -lglew32
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/D:/OpenGL/glew-1.5.4/lib/ -lglew32dINCLUDEPATH += $$PWD/D:/OpenGL/glew-1.5.4/include
DEPENDPATH += $$PWD/D:/OpenGL/glew-1.5.4/includeHowever, I click the green triangle icon on the bottom left the run the program, still get the errors:
error: C1083: Cannot open include file: 'GL/glew.h': No such file or directory
Why? Thanks in advance
-
wrote on 7 Feb 2013, 06:37 last edited by
This path makes no sense;
$$PWD/D:/OpenGL/glew-1.5.4/includeThe $$PWD expands to the place where your .pro file lives. Appending a full path to that can not give you a proper path.
-
wrote on 7 Feb 2013, 14:17 last edited by
Thanks,
I changed it to D:/OpenGL/glew-1.5.4/include, but the errors are the same
-
wrote on 7 Feb 2013, 15:00 last edited by
try run qmake and then compile
-
wrote on 7 Feb 2013, 15:50 last edited by
This is how I did, but I work in Linux, hope it helps you:
@INCLUDEPATH += /usr/lib
DEPENDPATH += /usr/libINCLUDEPATH += /APPS/datared/bin/cgal/include
DEPENDPATH += /APPS/datared/bin/cgal/includeINCLUDEPATH += /APPS/datared/bin/cgal/include/CGAL/config/x86-64_Linux-2.6_g++-3.4.6
LIBS += -L/usr/lib64 -lboost_thread
LIBS += -L/APPS/datared/bin/cgal/lib/x86-64_Linux-2.6_g++-3.4.6 -lCGAL@
Regards.
1/5