PDA

View Full Version : Qt 4.6 pr1 on Snow leopard? 64bit vs 32bit question



akos.maroy
11th September 2009, 14:34
I'm trying to build an app on MacOS X 10.6, that compiled fine on 10.5. When using the same Qt as on 10.5, I get:


/Users/maroy/src/tools/usr/include/QtGui/qregion.h: In member function 'OpaqueRgnHandle* QRegion::handle(bool) const':
/Users/maroy/src/tools/usr/include/QtGui/qregion.h:159: error: 'toQDRgn' was not declared in this scope


so I downloaded Qt 4.6 pr1, compiled it - and now I get:


/Users/maroy/src/tools/usr/include/QtCore/qglobal.h:288:2: error: #error "You are building a 64-bit application, but using a 32-bit version of Qt. Check your build configuration."
In file included from /Users/maroy/src/tools/usr/include/QtGui/qevent.h:47,


(and also the same error as above)

I just built Qt 4.6 from the source tarball, and I sort of expected it to 'just work'

what am I doing wrong?

diego.marcos
15th September 2009, 17:15
Hi guys:

I got the same problem and message when compiling on Snow Leopard (10.6). Code that was compiling properly with Qt 4.5.2 does not do anymore with Qt 4.6 pr1 out of the box. I didn't use any special option when configuring Qt compilation.

Any solution out there?

Cheers,

Diego.

larryy
3rd October 2009, 01:17
Make that at least 3 of us. Everything compiles fine with Qt 4.5.2 and 10.5.x, but I get the same 64-bit vs. 32-bit error message with Qt 4.5.3 and 10.6.x as others are seeing with Qt 4.6 and 10.6.x.

I'm booted with a 32-bit kernel. I'm not specifying anything to request a 64-bit build. Yet Qt is convinced I'm building 64-bit (and using a 32-bit version of Qt).

Anyone have any suggestions?

larryy
3rd October 2009, 02:35
Ah, problem solved. The default version of Qt for Mac OS X is still their "Carbon" build which is 32-bit. And by default g++ now builds 64-bit executables in Snow Leopard. Either download the "Cocoa", 64-bit version of Qt or add -arch i386 to your build using the default Qt and all is well.