Hi all,
I’m new to developing with QT, but I’d like to develop c++ application using this framework.
Since I’m blind and QT Creator has some important accessibility issues in Mac OS X, I thought I could develop QT-Based applications using the QMake command line tool. However, I am not able to build my first application. Running QMake to generate the makefile doesn’t give me any warning nor error, but running the make command I get the following output:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.6 -o ts.app/Contents/MacOS/ts -F/Users/my_username/Downloads/qt_src/qtbase/lib -framework QtGui -framework QtCore -framework OpenGL -framework AGL
Undefined symbols for architecture x86_64:
“_main”, referenced from:
start in crt1.10.6.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [ts.app/Contents/MacOS/ts] Error 1
The app is named ts. Here’s the ts.pro file content:
TEMPLATE = app
TARGET = ts
QT = core gui
sources += main.cpp
And here’s my very very simple main.cpp content:
#include <QApplication>
using namespace std;
int main(int argc, char* *argv) {
QApplication myApp(argc, argv);
return(myApp.exec());
}
After running make, I get an app bundle, but I cannot run it; Mac OS X tells me that it is damaged or incomplete and, in fact, it misses the main executable.
I’m running Mac OS X 10.9.2; I’m using QT 5.2.1 and I have installed Xcode 5.1. Not sure if this is important, but since the QT Installer is not accessible, I built QT from source.
Any help is very appreciated, since I don’t know what to do to solve the problem. Thanks in advance.
↧