Я только что установил Qt5 и вооружившись «++ GUI Programming C с QT 4 (второе издание)» я попытался собрать очень кода приложения выглядит следующим образом: -test.pro:Qt приложение не удалось скомпилировать
SOURCES += \
main.cpp
QT+=widgets
и main.cpp:
#include <QApplication>
#include <QLabel>
int main(int argc,char *argv[]){
QApplication app(argc,argv);
QLabel * label = new QLabel("hello world");
label->show();
return app.exec();
}
Вот ошибки:
19:45:21: Running steps for project test...
19:45:21: Configuration unchanged, skipping qmake step.
19:45:21: Starting: "/usr/bin/make"
g++ -Wl,-rpath,/opt/Qt5.2.0/5.2.0/gcc -Wl,-rpath,/opt/Qt5.2.0/5.2.0/gcc/lib -o test main.o -L/opt/Qt5.2.0/5.2.0/gcc/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
make: *** [test] Error 1
19:45:21: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project test (kit: Desktop Qt 5.2.0 GCC 32bit)
When executing step 'Make'
19:45:21: Elapsed time: 00:00.
Я использую Ubuntu 13.10 x86.
В настоящее время установка: это сработало, это сработало – thrax