Reputation: 139
I am trying to compile a piece of example c++ code from qt.io:
#include <QApplication>
int main(int argc, char **argv){
QApplication app (argc, argv);
return app.exec();
}
I then did qmake
. With a qt.pro containing the following:
TEMPLATE += app
QT += gui declarative
SOURCES += qt.cpp
When I then do a make
it gives the following error:
g++ -Wl,-O1 -o qt qt.o -L/usr/lib64/qt4 -lQtDeclarative -lQtGui -L/usr/lib64/qt4 -lQtCore -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lQtDeclarative
collect2: error: ld returned 1 exit status
Makefile:102: recipe for target 'qt' failed
make: *** [qt] Error 1
I am using funtoo linux
Upvotes: 0
Views: 257
Reputation: 139
Following AMA's comment, I removed declarative from my qt.pro. This solved the problem.
Upvotes: 1