[vtkusers] VTK (5.4.2) + Xcode(3.2.1) on Mac (SnowLeopard 10.6)
scottrharris at gmail.com
Fri May 14 20:52:28 EDT 2010
Dylibs: Well, I got this working a few years ago where I had VTK+Cocoa+Python+PyObjC+ObjC all working together in a demo app. I never went beyond that, but I'd like to get back to it. It was on an old version of OSX on PPC. The dylibs are required for Python since you need to import the VTK stuff at runtime.
The odd thing that I'm seeing now is that if I build the dylibs and link to the .a files, the project somehow thinks I'm using dylibs. Rebuilding VTK for static libs fixes the issue.
Are the .a files really different when I build shared libs? I was hoping to have both versions in one place.
I'm going to try building the static libs in one directory and shared libs in another and see what happens. Maybe the ObjC code can be statically linked and I can import the vtk stuff into python from the shared lib directory.
I agree dylibs are a pain, but I know it could be done in the past. I'll have to study up on them so I'm not working by trial and error.
As far as that linker path goes, where does it come from? I could not find the source of it when I was poking around in the XCode settings.
On May 14, 2010, at 5:09 PM, Sean McBride wrote:
> On Thu, 13 May 2010 20:29:34 -0600, Scott Harris said:
>> Along these lines, I tried to convert the SimpleCocoaVTK demo from
>> static libs to dylibs
> Why? (Just curious)
> dylibs are a pain because they include within them the path where they
> need to be installed.
>> 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.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/
>> ld: warning: directory '/Users/scott/Development/Cocoa/../../../../
>> kitware/VTK-debug-install/lib/vtk-5.5' following -L not found
> Whoops. That's my fault. I've fixed it locally, but am scared to do my
> first push to the new git repo late on a Friday, I'll do it Monday morning....
> Sean McBride, B. Eng sean at rogue-research.com
> Rogue Research www.rogue-research.com
> Mac Software Developer Montréal, Québec, Canada
More information about the vtkusers