[vtkusers] Running Example on Osx

David E DeMarle dave.demarle at kitware.com
Wed May 16 10:24:15 EDT 2012


Did you look on the advanced options set for VTK_REQUIRED_OBJCXX_FLAGS?

VTK's build configuration puts that compiler flag in for OSX 10.5
(leopard) and up.
Presumably this is to better integrate with the Mac Cocoa API.

The Qt package you've got apparently wasn't built with that compiler
flag for some reason. I don't see it in Qt 4.8.1's source anywhere
important so they must deal with Cocoa differently.

My intuition about why it doesn't work in static, but does in shared
is simply that static links are more strict than the shared links are,
so a shared build will work just fine especially if none of the
affected symbols are encountered at runtime.

My suggestion is to remove -fobjc-gc from a fresh static vtk build and
see if it all works without it. If not, build qt and force it into
their compiler flags.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Wed, May 16, 2012 at 5:11 AM, Ale <notinmyhead at gmail.com> wrote:
> Yes, I build with the default settings. Without Shared Lib enabled. The VTK_REQUIRED_OBJCXX_FLAGS is not present I see...
>
> I tried again including the shared libs (basically because I noticed that the design plugin was missing...) and now it seems to work properly... Why?
>
> Il giorno 15/mag/2012, alle ore 19.14, Sean McBride ha scritto:
>
>> On Tue, 15 May 2012 15:44:06 +0200, Ale said:
>>
>>> I had build the VTK library version 5.10.0 including the Example.
>>> Whenever I tried to run one of the example using Qt, I get this error:
>>>
>>> objc[63533]: '/Library/Frameworks/QtGui.framework/Versions/4/QtGui' was
>>> not compiled with -fobjc-gc or -fobjc-gc-only, but the application
>>> requires GC objc[63533]: '/Library/Frameworks/QtWebKit.framework/
>>> Versions/4/QtWebKit' was not compiled with -fobjc-gc or -fobjc-gc-only,
>>> but the application requires GC
>>>
>>> I use the Qt 4.7.4, which I downloaded and installed using the Qt package.
>>
>> Did you build VTK with default settings?  What's set in cmake for the VTK_REQUIRED_OBJCXX_FLAGS setting?
>>
>> --
>> ____________________________________________________________
>> Sean McBride, B. Eng                 sean at rogue-research.com
>> Rogue Research                        www.rogue-research.com
>> Mac Software Developer              Montréal, Québec, Canada
>>
>>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list