[Interest] OSX 10.6.* + Qt4.8.1 Problem
Till Oliver Knoll
till.oliver.knoll at gmail.com
Thu Jun 7 22:23:28 CEST 2012
Am 07.06.2012 um 14:06 schrieb "Alexander Carôt" <alexander_carot at gmx.net>:
> ld: warning: in /Users/soulalex/QtSDK2/Desktop/Qt/4.8.1/gcc/lib/QtScript.framework/QtScript, file was built for unsupported file format which is not the architecture being linked (i386) --- and then it spreads tons of errors due to the wrong file format (it says Qt was built for "unsupported")
Qt is "unsupported" in the sense that it does not support the architecture you are currently trying to build and link. And from your error description I understand that you are trying to build and link /your/ application in 32bit mode! Which in fact is /not/ supported anymore by the precompiled Mac Cocoa Qt which since some recent version (4.8? 4.7.x) comes /only/ in 64bit architecture.
You probably used to link against some older (4.6? Some early 4.7?) Qt version which /did/ come in both 32 and 64bit flavours (there is a command line tool of which I always forget the name - file? - which shows you the architectures a given binary supports). I know this for sure because in my qmake script I used to strip away the 32bit part of all Qt libraries and plugins - this part has become superfluous (and in fact did raise an error), as Qt now ships in 64bit /only/.
Note that gcc with the latest XCode on 10.6.8 does produce 64bit binaries by default. Which is also the recommended thing (it /does/ give you a few extra registers on the CPU and hence slightly more performant code).
So in your qmake project file make sure to exclude the i384 build option (or not to include it - as I said, default should be 64bit only anyway).
However if you /really/ want to (also) support 32bit CPUs, you now need to compile Qt yourself with the appropriate build flags.
More information about the Interest