Quantcast
Channel: Error building simple Qt5 application - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Error building simple Qt5 application

$
0
0

I installed Qt 5.0.0 (qt-mac-opensource-5.0.0-clang-offline.dmg) on a Mac OS X 10.7.5 and now I'm trying to compile a "Hello World" application using Qt Creator 2.6.1.

The build process complains about a directory not found: /Users/karlphillip/Qt5.0.0/5.0.0/clang_64/qtbase/lib , followed by several linking errors:

clang++ -c -pipe -mmacosx-version-min=10.6 -O2 -Wall -W -fPIE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I/Users/karlphillip/Qt5.0.0/5.0.0/clang_64/mkspecs/macx-clang -I. -I/Users/karlphillip/Qt5.0.0/5.0.0/clang_64/include -I/Users/karlphillip/Qt5.0.0/5.0.0/clang_64/include/QtGui -I/Users/karlphillip/Qt5.0.0/5.0.0/clang_64/lib/QtGui.framework/Versions/5/Headers -I/Users/karlphillip/Qt5.0.0/5.0.0/clang_64/include/QtCore -I/Users/karlphillip/Qt5.0.0/5.0.0/clang_64/lib/QtCore.framework/Versions/5/Headers -I. -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/System/Library/Frameworks/AGL.framework/Headers -o main.o main.cppclang++ -headerpad_max_install_names -mmacosx-version-min=10.6 -o hello_qt.app/Contents/MacOS/hello_qt main.o -F/Users/karlphillip/Qt5.0.0/5.0.0/clang_64/lib -framework QtGui -F/Users/karlphillip/Qt5.0.0/5.0.0/clang_64/qtbase/lib -framework QtCore -framework OpenGL -framework AGLld: warning: directory not found for option '-F/Users/karlphillip/Qt5.0.0/5.0.0/clang_64/qtbase/lib'Undefined symbols for architecture x86_64:"QApplication::QApplication(int&, char**, int)", referenced from:_main in main.o"QLabel::QLabel(QString const&, QWidget*, QFlags<Qt::WindowType>)", referenced from:_main in main.o"QWidget::show()", referenced from:_main in main.o"QPushButton::QPushButton(QString const&, QWidget*)", referenced from:_main in main.o"QApplication::exec()", referenced from:_main in main.o"QPushButton::~QPushButton()", referenced from:_main in main.o"QLabel::~QLabel()", referenced from:_main in main.o"QApplication::~QApplication()", referenced from:_main in main.old: symbol(s) not found for architecture x86_64clang: error: linker command failed with exit code 1 (use -v to see invocation)make: *** [hello_qt.app/Contents/MacOS/hello_qt] Error 1

It's important to note that the path /Users/karlphillip/Qt5.0.0/5.0.0/clang_64/qtbase/lib is not valid because the directory qtbase doesn't exist. The working path is /Users/karlphillip/Qt5.0.0/5.0.0/clang_64/lib. I'm not referring to qtbase anywhere in my project, so this is probably being added by qmake.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images