I need to build my QT console application as 64 bit. i.e. x86_64
My config file looks like this:
CONFIG += qt console debug x86_64
CONFIG -= app_bundle
HEADERS = HelperClass.h
SOURCES = HelperClass.cpp \
main.cpp
The compile goes fine without issue. But, when the build gets to the link step, it complains that I don’t have the Qt x86_64 architecture.
Excerpt from build:
ld: warning in /Library/Frameworks/QtGui.framework/QtGui, missing required architecture x86_64 in file ld: warning in /Library/Frameworks/QtCore.framework/QtCore, missing required architecture x86_64 in file Undefined symbols: "QIODevice::getChar(char*)", referenced from: ...
Do I need to download the Qt source and build the required architecture for this to work? My install is from the provided binaries for Mac OSX – Qt 4.5.2 on the QT site. I’m guessing that build does not come with 64bit versions of the libraries. Am I correct?
From the Qt for Open Source C++ development on Mac OS X page it appears that the 32 and 64 bit libraries should be included:
If you are still having trouble you could try to download the source from the same page:
and configure with:
See http://doc.trolltech.com/4.5/developing-on-mac.html#universal-binaries
Note that the link above mentions that if no arch is specified it builds 32bit for the current platform.