<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">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). &nbsp;That didn't work and putting the .a files back doesn't result in a working executable.<div><br></div><div>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.</div><div><br></div><div>Here's a typical error that I get at runtime:</div><div><br></div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; ">Running…</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; "><b>dyld: Library not loaded: libvtkftgl.5.6.dylib</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 42px; text-indent: -42px; font: normal normal normal 11px/normal Menlo; "><b>&nbsp; Referenced from: /Users/scott/Development/Cocoa/build/Debug/SimpleCocoaVTK.app/Contents/MacOS/SimpleCocoaVTK</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 42px; text-indent: -42px; font: normal normal normal 11px/normal Menlo; "><b>&nbsp; Reason: image not found</b></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; ">sharedlibrary apply-load-rules all</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; ">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")</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; ">Cannot access memory at address 0x0</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: normal normal normal 11px/normal Menlo; ">Cannot access memory at address 0x0</div><div style="text-indent: -28px;"><font class="Apple-style-span" face="Menlo" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div><div style="text-indent: -28px;"><font class="Apple-style-span" face="Menlo" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div><div style="text-indent: -28px;"><font class="Apple-style-span" face="Menlo" size="3"><span class="Apple-style-span" style="font-size: 11px;">T</span></font></div><div style="text-indent: -28px;"><font class="Apple-style-span" face="Menlo" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div><div><div>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.</div><div><br></div><div>Also, there is a linker path during compile that I can't find the origin of in XCode:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; ">Ld /Users/scott/Development/Cocoa/build/Debug/SimpleCocoaVTK.app/Contents/MacOS/SimpleCocoaVTK normal i386</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; ">cd /Users/scott/Development/Cocoa</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; ">setenv MACOSX_DEPLOYMENT_TARGET 10.5</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; ">/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</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; ">ld: warning: directory '/Users/scott/Development/Cocoa/../../../../kitware/VTK-debug-install/lib/vtk-5.5' following -L not found</div><div style="text-indent: -12px;"><font class="Apple-style-span" face="Menlo" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div><div style="text-indent: -12px;"><font class="Apple-style-span" face="Menlo" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div><div style="text-indent: -12px;"><font class="Apple-style-span" face="Menlo" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div><div style="text-indent: -12px;"><font class="Apple-style-span" face="Menlo" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div></div><div>I can not find the origin of the vtk-5.5 -L directive. I'm baffled.</div><div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><div>Thanks,</div><div>-Scott</div><div><br></div><div><br></div><div>On Apr 30, 2010, at 5:30 PM, Scott Harris wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Copying the NIB files from the older version of the project at <br><br><a href="https://www.rogue-research.com/vtk/SimpleCocoaVTK.html">https://www.rogue-research.com/vtk/SimpleCocoaVTK.html</a><br><br>fixes the issue and I get a working demo (with 180 compiler warnings, however).<br><br>I think the NIB files distributed with VTK 5.6.0 are corrupted somehow.<br><br>-Scott<br>On Apr 30, 2010, at 5:19 PM, Scott Harris wrote:<br><br><blockquote type="cite">I'm trying to build the version of SimpleCocoaVTK that comes with VTK5.6.0, but I'm unable to open the NIB files:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">"<br></blockquote><blockquote type="cite">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).<br></blockquote><blockquote type="cite">"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">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?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I'm using XCode 3.2.2 and OS 10.6.2.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks,<br></blockquote><blockquote type="cite">-Scott<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Mar 1, 2010, at 12:20 PM, Sean McBride wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">On 2/26/10 6:57 PM, Stanley11 said:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">I try to use VTK (5.4.2) + Xcode(3.2.1) on Mac (SnowLeopard 10.6) but fail<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">in compiling the project SimpleCocaVTK downloaded from<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">https://www.rogue-research.com/vtk/SimpleCocoaVTK.html.<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Apologies to all for not keeping this example up-to-date.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I've just updated VTK CVS to have a working example (I'll update our<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">website later).<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Stanley and Scott, can you please try the newest version, and reply on-<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">list if you still have troubles.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Thanks,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">--<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">____________________________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Sean McBride, B. Eng &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sean@rogue-research.com<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Rogue Research &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;www.rogue-research.com<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Mac Software Developer &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Montréal, Québec, Canada<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><br></div></blockquote></div><br></div></body></html>