[vtkusers] [Snapshot-users] How to compile Qt-4.5.x for Mac OS X 10.5.5 to use 64-bits and Cocoa bindings

Elvis Dowson elvis.dowson at mac.com
Sat Sep 27 11:23:43 EDT 2008


Hi,
         I think I know why the Qt-4.5.x is getting confused. It's  
because my .profile declared the following environment variables with - 
arch i386 for building grass-6.4.0.
export CFLAGS="-arch i386 -Os"
export CXXFLAGS="-arch i386 -Os"
export LDFLAGS="-arch i386 -Os"

This is probably what was causing it. Will check it out!

Best regards,

Elvis Dowson

On Sep 27, 2008, at 6:48 PM, Elvis Dowson wrote:

> Hi Trent,
>         		 just ran otool -L on the QtGui file and it confirms the  
> fact that even though I have use the -cocoa option to build the  
> Qt-4.5.x snapshot release, it is still linking against the Carbon  
> framework.
>
> Trent, as you know, I was not able to build Qt-4.5.x for 64-bits  
> because the -arch x86_64 did not work for some files and was getting  
> confused with -arch i386 which was automatically used, despite the  
> configure command being passed -arch x86_64 alone.
>
> So, in effect
> a. 32-bit cocoa support for Qt-4.5.x does not happen at all. Even if  
> you pass -cocoa to the configure command, it is infact linking  
> against the Carbon libraries.
>
> b. I cannot get 64-bit to work for Qt-4.5.x, and I think in the  
> Qt-4.5.x sources, cocoa support is only enabled if you use 64-bits.
>
> Could you please advice on a possible resolution? Thanks! :-)
>
> Best regards,
>
> Elvis Dowson
>
>
> elvis-dowsons-macbook-pro:QtGui.framework elvis$ otool -L QtGui
> QtGui:
> 	/Developer/Applications/Qt-4.5.0/lib/QtGui.framework/Versions/4/ 
> QtGui (compatibility version 4.5.0, current version 4.5.0)
> 	/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon  
> (compatibility version 2.0.0, current version 136.0.0)
> 	/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit  
> (compatibility version 45.0.0, current version 949.35.0)
> 	/usr/local/lib/libpng12.0.dylib (compatibility version 32.0.0,  
> current version 32.0.0)
> 	/Developer/Applications/Qt-4.5.0/lib/QtCore.framework/Versions/4/ 
> QtCore (compatibility version 4.5.0, current version 4.5.0)
> 	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version  
> 1.2.3)
> 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current  
> version 111.1.1)
> 	/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ 
> ApplicationServices (compatibility version 1.0.0, current version  
> 34.0.0)
> 	/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current  
> version 7.4.0)
> 	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current  
> version 1.0.0)
> 	/System/Library/Frameworks/CoreServices.framework/Versions/A/ 
> CoreServices (compatibility version 1.0.0, current version 32.0.0)
> 	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current  
> version 227.0.0)
> 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/ 
> CoreFoundation (compatibility version 150.0.0, current version  
> 476.15.0)
> 	/System/Library/Frameworks/Foundation.framework/Versions/C/ 
> Foundation (compatibility version 300.0.0, current version 677.21.0)
>
>
>
> On Sep 27, 2008, at 12:26 AM, Michael Jackson wrote:
>
>> Use otool -L [path to the plugin] and look at the output. It will  
>> tell you exactly what all it is linking against.
>>
>> Next, go in the vtkCarbonRenderWindow.h and at the very top put the  
>> following:
>>
>> #error THIS IS A CARBON SOURCE CODE FILE. IT SHOULD NOT BE INCLUDED.
>>
>> Compile. You _should_ get that error which means there are checks  
>> missing and the vtkCarbonRenderWindow code is being included in the  
>> compile, which should NOT be happening.
>>
>> Mike
>>
>> O\




More information about the vtkusers mailing list