Ich versuche, ein Stück Beispiel C++ Code aus qt.io zu kompilieren:Kann nicht C++ kompiliert mit QT
#include <QApplication>
int main(int argc, char **argv){
QApplication app (argc, argv);
return app.exec();
}
Ich habe qmake
dann. Mit einem qt.pro mit folgendem Inhalt:
TEMPLATE += app
QT += gui declarative
SOURCES += qt.cpp
Als ich dann ein tun make
es gibt die folgenden Fehler:
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
ich funtoo Linux
Vielleicht, wenn Sie Qt auf Funtoo kompiliert haben, haben Sie QtDeclarative nicht erstellt. Es sollte "dev-qt/qtdeclarative" sein Ich glaube (ich benutze gentoo nicht funtoo) du kannst mit 'equery list qtde *' – drescherjm
entfernen 'deklarative' von deiner .pro – AMA