Not able to build with Qt Creator on Mac OSX 10.8.1
-
Hi,
I am new to both Qt and Mac OSX . I am using Qt 2.4.1 with Qt library 4.8.3 on Mac OSX 10.8.1.
I am using XCode 4.5.1.
I am trying to compile C++ code. During the build process, I first got the warning -
"warning "This version of Mac OS X is unsupported".
Then I got a bunch of similar warning - like -
"warning: directory not found for option '-L/tmp/qt-stuff-85167/source/qt-everywhere-opensource-src-4.8.1/Desktop/Qt/4.8.1/gcc/lib'
Then I got another warning -"warning: ignoring file /Users/vijaythakur/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtCore.framework/QtCore, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /Users/vijaythakur/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtCore.framework/QtCoreignoring file /Users/vijaythakur/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtSql.framework/QtSql, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /Users/vijaythakur/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtSql.framework/QtSqlignoring file /Users/vijaythakur/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtXml.framework/QtXml, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /Users/vijaythakur/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtXml.framework/QtXmlignoring file /Users/vijaythakur/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtGui.framework/QtGui, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): /Users/vijaythakur/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtGui.framework/QtGui"
Then I got error -
"operator<<(QDebug, QSqlError const&)", referenced from:
SelectHandler::getDeviceErrorInfo(Command&) in selecthandler.o
d: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/1f/v4rbw7gx5wd5w49797b3yprm0000gn/T//ccDw1Njq.out (No such file or directory)
make: *** [DeviceUtility2.app/Contents/MacOS/DeviceUtility2] Error 1I guess that id symbols not found for the architect i386 is due to incompatible library.If that is the case, then please let me know the correct version for Mac OSX 10.8.1
-
Don't use macx-xcode mkspecs, it is broken for Xcode 4.5. Use macx-llvm or macx-g++ instead. You can pass mkspec to qmake with "-spec macx-llvm" flag.
-
I am having the same problem and I am using macx-g++, I have tried macx-llvm with the same problem. I can get my code to compile when I omit x86 from the following line in the .pro file and build for 64 bit only.
@CONFIG += x86 x86_64@
I have just upgraded to mountain lion, latest xcode and bump Qt libraries to 4.8.3. This was all working fine on Mountain Lion with latest xcode and 4.8.0. I upgraded as there are specific mountain lion fixes in 4.8.3.
Might be worth noting I'm building outside of Qt creator just to simplify things a little.