[vtkusers] Vtk programming on Mac OS X with Xcode

Mike Jackson imikejackson at gmail.com
Wed Jul 11 07:32:00 EDT 2007

On 7/10/07, Jing <jli023 at cs.auckland.ac.nz> wrote:
> 1. I checked one of the vtk libraries
> dhcp-39pool-08:~/development/VTKBuild/bin jli023$ file libvtkCommon.a
> libvtkCommon.a: Mach-O universal binary with 2 architectures
> libvtkCommon.a (for architecture ppc):  current ar archive random library
> libvtkCommon.a (for architecture i386): current ar archive random library
> Does the result mean that VTK was built as a Universal Binary? Is it related
> to my problem when running VTK in release mode?
> 2. I checked the Cmake cache file in the VTKBuild folder, in which, the
> modifier of build type is empty.
> //Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
> // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
> //
> //Flags used by the compiler during all build types.
> //Flags for C compiler.
> In such case, were the VTK libraries built in Debug mode or Release mode? I
> guess my problem is that the Xcode project can not link to the right
> libraries in Release mode.
> 3. I built a Xcode project for the Cone.cxx using CMake according to your
> instruction in your previous reply. The project can run in both of Debug and
> Release modes. Does it mean the VTK libraries work for both Debug and
> Release modes? If it is ture, why the Xcode project created by myself does
> not work in the Release mode?
> Thanks a lot,
> Jing
Well, those libraries in that particular directory _are_ universal
binary. When you swtich to Release mode are you still linking against
the same libraries? Usually Xcode will switch to a different

   Also, who made your "new" project? Did you let cmake generate it or
did you generate it by hand? It sounds like a general link error. Look
at the detailed build output and look though the line command that is
doing the linking. Are all the proper link libraries being included?
Are all the link directories available?

You may want to take this to the xcode-users mailing list at
lists.apple.com. There you can get help with Xcode specific settings.

Mike Jackson
imikejackson _at_ gee-mail dot com

More information about the vtkusers mailing list