Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

[SOLVED] Qt Creator - Undefined reference to...

$
0
0
Hello everybody, I just intalled Qt Creator on my Ubuntu 12.10 (Qt 5.0 : library+Qt Creator on this webpage : http://qt-project.org/downloads). But I have buikd errors : /home/myusername/Documents/Cpp/Qt/testQt-build-Desktop_Qt_5_0_1_GCC_32bit-Debug/../testQt/main.cpp:7: undefined reference to `QApplication::QApplication(int&, char**, int)’ /home/myusername/Documents/Cpp/Qt/testQt-build-Desktop_Qt_5_0_1_GCC_32bit-Debug/../testQt/main.cpp:8: undefined reference to `QPushButton::QPushButton(QString const&, QWidget*)’ /home/myusername/Documents/Cpp/Qt/testQt-build-Desktop_Qt_5_0_1_GCC_32bit-Debug/../testQt/main.cpp:10: undefined reference to `QWidget::show()’ Etc. I know it’s link errors. But I don’t know how to fix theses errors… My .pro file is : SOURCES += \     main.cpp and my main.cpp is : #include <iostream> #include <QtWidgets/QApplication> #include <QtWidgets/QPushButton>   int main(int argc, char* argv[]) {     QApplication app(argc, argv);     QPushButton button("Push Me");       button.show();       return  app.exec();  } My Qt5.0.1 folder is in /home/myusername/ . If someone can help me… it could be great! ;D Thanks!

Viewing all articles
Browse latest Browse all 2113

Trending Articles