[vtkusers] using Xcode for debugging VTK C++ examples?

Michael Jackson mike.jackson at bluequartz.net
Tue Oct 11 17:08:13 EDT 2011


That is because the generated libraries do not have their path encoded in the libraries so the executables do not know where to find them. Basically you need to set the "DYLD_LIBRARY_PATH" to the "bin" directory inside the binary directory. This is probably done through some property the executable in the Xcode project, or maybe on a global for all executables somewhere in the Xcode project. 
  Maybe there is an option somewhere in the building of VTK to have those paths set in the generated libraries. Not sure. Probably something about BUILD_DIR or running from BUILD_DIR or something like that. It has been a very long time since I have built VTK, but that _is_ the problem.
___________________________________________________________
Mike Jackson                    Principal Software Engineer
BlueQuartz Software                            Dayton, Ohio
mike.jackson at bluequartz.net              www.bluequartz.net

On Oct 11, 2011, at 4:23 PM, mitja_mreza at indiana.edu wrote:

> Dear VTK Users list,
> 
> could anyone point me to any relatively up-to-date tutorial for *debugging* VTK C++ examples in Xcode?
> 
> (I don't need Cocoa specific instructions, just an example to have step-by-step debugging work in Xcode, e.g. on the basic VTK C++ examples)
> 
> Here are some details of the issue I seem to have encountered:
> 
> - building and running VTK C++ code from command line works fine on my system (it's routinely in use to build CompuCell3D from makefiles).
> 
> - Xcode compiles the Cone Step1 example fine, from an xcodeproj obtained from "cmake ../ -G Xcode" and VTK_DIR poiting to the proper path.
> 
> - both "build and debug" or "build and run" in Xcode however yield this error:
> 
> "dyld: Library not loaded: libvtkRendering.5.4.dylib"
> 
> This is on Mac OS X 10.6.8 Snow Leopard, Xcode 3.2.6, and VTK 5.4.2.
> 
> Any help would be much appreciated!
> -Mitja
> 
> _______________________________________________
> 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