I have tried this both on Ubuntu Linux and on Windows. I can not get Qt to link any of its libraries or any external libraries, I have tried just about every LIBS += -Lpath/to/lib -llib and INCLUDEPATH += path/to/include/files combination possible in my .pro file:
QT += opengl
TARGET = QtOpenGLExample
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp \
GLExampleWidget.cpp
HEADERS += GLWidget.h
LIBS += -L /usr/lib/ -llibQtOpenGL.so.4.6.2
I noticed this being a problem when I clicked “Open GL” in the project creator and it did not work then (even after I tried messing around in the .pro), before I just thought I was doing something stupid when I tried to link SFML 1.6.
P.s Does it have to do with were my project is located?:
/home/aperson/Projects/ComputerProgramming/C++/OpenGLExample/
It is because you have told
qmakethat you are creating a console application in your .pro file making it ignore all the GUI libraries. So get rid of theCONFIG += consoleline.