[vtkusers] VTK static link with Qt app on Mac OS X
Gib Bogle
g.bogle at auckland.ac.nz
Tue Sep 28 01:17:27 EDT 2010
On 28/09/2010 3:06 a.m., Clinton Stimpson wrote:
>
> Qt 4.5 and later support both Cocoa and Carbon. You have to pick one when
> configuring (the default is still Carbon).
>
> That VTK even built without problems indicates Qt and VTK configured correctly.
>
> Gib, you just need to add "-framework Carbon" to your link command.
>
> Clint
>
> On 09/27/2010 06:51 AM, David Gobbi wrote:
>> Hi Gib,
>>
>> You should probably be building VTK with VTK_USE_COCOA=ON. Qt 4.5 and
>> later use Cocoa, older versions of Qt use Carbon. VTK must be built
>> with the GUI toolkit that Qt uses.
>>
>> David
>>
>>
>> On Mon, Sep 27, 2010 at 3:13 AM, André Prins<a.h.prins at gmail.com> wrote:
>>> Hi Gib,
>>>
>>> Although I am not a Mac user, my first guess would be that you are
>>> missing some Apple/Mac libraries when linking. Perhaps -lAGL -lCocoa
>>> (or -lCarbon).
>>>
>>> You could try to google for the exact libraries corresponding to the
>>> missing symbols. Alternatively, you could check which libraries were
>>> used to link vtkRendering.
>>>
>>> Regards,
>>> Andre
Combining tips from Andre and Clint, and some googling for the last unreferenced
symbol, I added
-framework Carbon -framework AGL -framework IOKit
and it works!
Thanks to everyone who responded.
Gib
More information about the vtkusers
mailing list