[Qgis-developer] Link issues on mac

Tom Elwertowski telwertowski at comcast.net
Wed Apr 2 15:17:35 EDT 2008

Using Qt will hide the objective-c from qgis. We will continue to use the same cross-platform c++ interface.

Trolltech is rewriting their low level Mac c++ code in objective-c so that we don't have to use objective-c at our level. Calls from c++ to objective-c will occur in the lower levels of Qt. This needs to be done because Apple has decided not to port Carbon (gui c api) to 64 bits. New gui features starting with OS X 10.5 will appear only in the Cocoa (objective-C) api.

A side note: Apple is promoting objective-c as the standard development language while Microsoft is promoting c#. Both companies appear to prefer that software not be easily portable. 

Since rewriting the whole Mac-specific layer of Qt is a big project, Trolltech is not porting the Qt3Support layer. Therefore, we need to remove 1) Qt3Support library, 2) use of Qt3 compatibility routines defined in Qt4 classes and 3) implicit casts from QString to char*.

I have mostly done this (a few things here and there still commented out rather than ported) for all except the GRASS plugin and built qgis as a 64bit Qt4.4-Cocoa application. Qt4.4-Cocoa is an alpha release and is still unstable. Bitmaps with an alpha channel have problems and popup menus don't popdown. Viewing vector layers is about all qgis/mac64 is good for right now. I am also testing my qgis mods with Qt4.2 and 4.3 where they work as expected.

Thanks to William for all the 64 bit libraries! I can build 32/64 bit for OS X 10.5 only or 32 bit for OS X 10.4 but haven't looked at how to build 32(10.4)/64(10.5) libraries.


Tim Sutton wrote:
> On the subject of cocoa, i finally (I think!) wrapped my brain around
> what the difference between cocoa and carbon is after reading a good
> article on the history of os x on wikipedia. I even wrote a silly
> little app in objective-c. Objective-c + carbon looks interesting but
> Qt4 still seems to be the most intuitive development framework I've
> ever come across....but maybe I'm biased :-) One nice thing about the
> cocoa app was that the resulting app bundle was miniscule because it
> didnt need all those hulking great Qt libs stuck inside it.
> 2008/4/2, Tom Elwertowski <telwertowski at comcast.net>:
>> work on porting code to Qt4.4-Cocoa.

More information about the Qgis-developer mailing list