[vtkusers] VTK (5.4.2) + Xcode(3.2.1) on Mac (SnowLeopard 10.6)
Scott Harris
scottrharris at gmail.com
Thu May 13 22:29:34 EDT 2010
Along these lines, I tried to convert the SimpleCocoaVTK demo from static libs to dylibs by removing the .a files and adding the appropriate .dylib files to the project (I also turned on shared libs in ccmake). That didn't work and putting the .a files back doesn't result in a working executable.
It seems like XCode is confused somehow. Even downloading a fresh copy of the demo still results in the linker looking for and not finding some dylibs.
Here's a typical error that I get at runtime:
Running…
dyld: Library not loaded: libvtkftgl.5.6.dylib
Referenced from: /Users/scott/Development/Cocoa/build/Debug/SimpleCocoaVTK.app/Contents/MacOS/SimpleCocoaVTK
Reason: image not found
sharedlibrary apply-load-rules all
Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/Applications/Xcode.app/Contents/PlugIns/GDBMIDebugging.xcplugin/Contents/Resources/PBGDBIntrospectionSupport.A.dylib")
Cannot access memory at address 0x0
Cannot access memory at address 0x0
T
The odd thing is that I'm trying to use any .dylibs in the project. I'm just compiling the project as-is from Examples/GUI/Cocoa.
Also, there is a linker path during compile that I can't find the origin of in XCode:
Ld /Users/scott/Development/Cocoa/build/Debug/SimpleCocoaVTK.app/Contents/MacOS/SimpleCocoaVTK normal i386
cd /Users/scott/Development/Cocoa
setenv MACOSX_DEPLOYMENT_TARGET 10.5
/Developer/usr/bin/g++-4.2 -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Users/scott/Development/Cocoa/build/Debug -L/Users/scott/Development/vtk5Build/lib/vtk-5.6 -L/Users/scott/Development/Cocoa/../../../../kitware/VTK-debug-install/lib/vtk-5.5 -L/Users/scott/Development/Cocoa/../vtk5Build/lib/vtk-5.6 -F/Users/scott/Development/Cocoa/build/Debug -filelist /Users/scott/Development/Cocoa/build/SimpleCocoaVTK.build/Debug/SimpleCocoaVTK.build/Objects-normal/i386/SimpleCocoaVTK.LinkFileList -mmacosx-version-min=10.5 -lz -framework Cocoa -framework OpenGL -lvtkCommon -lvtkftgl -lvtkGenericFiltering -lvtkGraphics -lvtkHybrid -lvtkImaging -lvtkIO -lvtkpng -lvtkRendering -lvtksys -lvtktiff -lvtkjpeg -framework IOKit -lvtkFiltering -o /Users/scott/Development/Cocoa/build/Debug/SimpleCocoaVTK.app/Contents/MacOS/SimpleCocoaVTK
ld: warning: directory '/Users/scott/Development/Cocoa/../../../../kitware/VTK-debug-install/lib/vtk-5.5' following -L not found
I can not find the origin of the vtk-5.5 -L directive. I'm baffled.
These may be Xcode questions, but I'm hoping folks on the list have run into this and solved it before with VTK+Cocoa+XCode.
Rebuilding VTK with "use shared libs" off fixes the first problem, but I'm still confused by it. Why can't I use dylibs and static libs side by side?
Thanks,
-Scott
On Apr 30, 2010, at 5:30 PM, Scott Harris wrote:
> Copying the NIB files from the older version of the project at
>
> https://www.rogue-research.com/vtk/SimpleCocoaVTK.html
>
> fixes the issue and I get a working demo (with 180 compiler warnings, however).
>
> I think the NIB files distributed with VTK 5.6.0 are corrupted somehow.
>
> -Scott
> On Apr 30, 2010, at 5:19 PM, Scott Harris wrote:
>
>> I'm trying to build the version of SimpleCocoaVTK that comes with VTK5.6.0, but I'm unable to open the NIB files:
>>
>> "
>> The document "MyDocument.nib" could not be opened. The operation couldn’t be completed. *** -[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive (0x62, 0x70, 0x6c, 0x69, 0x73, 0x74, 0x30, 0x30).
>> "
>>
>>
>> I can't open the NIB from the application (when it tries to run) or from interface builder. Is this a XIB vs NIB problem or perhaps a corrupt file?
>>
>> I'm using XCode 3.2.2 and OS 10.6.2.
>>
>> Thanks,
>> -Scott
>>
>>
>> On Mar 1, 2010, at 12:20 PM, Sean McBride wrote:
>>
>>> On 2/26/10 6:57 PM, Stanley11 said:
>>>
>>>> I try to use VTK (5.4.2) + Xcode(3.2.1) on Mac (SnowLeopard 10.6) but fail
>>>> in compiling the project SimpleCocaVTK downloaded from
>>>> https://www.rogue-research.com/vtk/SimpleCocoaVTK.html.
>>>
>>> Apologies to all for not keeping this example up-to-date.
>>>
>>> I've just updated VTK CVS to have a working example (I'll update our
>>> website later).
>>>
>>> Stanley and Scott, can you please try the newest version, and reply on-
>>> list if you still have troubles.
>>>
>>> Thanks,
>>>
>>> --
>>> ____________________________________________________________
>>> Sean McBride, B. Eng sean at rogue-research.com
>>> Rogue Research www.rogue-research.com
>>> Mac Software Developer Montréal, Québec, Canada
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100513/d7b1c335/attachment.htm>
More information about the vtkusers
mailing list