[Qt-interest] Qt4.6 Mysql driver conflits with Webkit on compilation MacOSX
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Mon Jan 18 15:39:35 CET 2010
Orian Patterson wrote on Monday, January 18, 2010 10:06 AM:
> ...
> The others errors I
> think where related with -arch x86_64, and mysql_5_x86_64 issues, it
> seems when building Qt with the -cocoa option -arch x86_64 must be
> specified, and both Qt build and mysql must have the same
> architecture.
Sorry to jump into the middle of this thread (especially without having read the beginning of it :0 ), but this triggers some memories of my first steps of Mac OSX development.
My situation was that I wanted to link against exiv2 library which I built from source. I first downloaded the Qt SDK 4.6 (including Qt Creator and everything(tm)), but the package seems to come only with the Carbon Qt (32bit only).
On Mac OSX 10.6 the default architecture is x86_64 when building with the standard Apple g++ compiler. So that left me with a 32bit Qt application (because that's what you get when building with the Carbon Qt) which I was trying to link against a 64 bit library (exiv2), which resulted in an "incompatible architecture" (or similar) linker error.
So I uninstalled the Qt 4.6 library only (the one which came from the complete SDK - there is a Python script somewhere, 'uninstallqt.py' or so) and re-installed the Qt 4.6 cocoa binary development package (the one without Qt Creator). Then I made sure that for my project:
CONFIG += x86_64
CONFIG -= x86
(or similar, don't remember the exact values - but the aim is to have a 64bit only binary, no mixed "32 & 64 bit" binary or so)
So once the Qt application binary and my exiv library are build using the same "architecture settings" (only 64bit in my case), then linking went flawlessly.
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list