[vtk-developers] VTK Examples don't build properly on Mac, CMAKE_OSX_ARCHITECTURES issue

Bill Lorensen bill.lorensen at gmail.com
Tue Dec 15 13:27:57 EST 2009


Sean,

Yes,

The examples are built with a custom command. This facilitates
building an example directory from a VTK build or individually. I
discovered this as I added more example.

Look in VTK/Examples/CMakeLists.txt. You will see a custom command
that runs CMake on the examples. It passes vtk build options to the
custom command. The weakness here is that not all cmake options are
passed. You found one. I assume there are more. Try adding your
CMAKE_OSX_ARCHITECTURES.

Bill


On Tue, Dec 15, 2009 at 1:17 PM, Sean McBride <sean at rogue-research.com> wrote:
> Hi all,
>
> With this talk of updating examples, I turned on BUILD_EXAMPLES and
> noticed that it does not work properly on Mac.
>
> I've specified CMAKE_OSX_ARCHITECTURES as 'i386' and I get link errors:
>
> ld: warning: in /Volumes/Leopard/Users/sean/kitware/VTK-clean-bin/bin/
> libvtkRendering.dylib, file is not of required architecture
> Undefined symbols:
>  "vtkRenderer::New()", referenced from:
>      _main in HierarchicalBoxPipeline.o
>
> libvtkRendering.dylib _is_ the right arch, namely i386.  I think the
> problem is that the examples are not being built as i386 but rather as
> x86_64 (the default on 10.6).
>
> But now I'm out of my element.  Could it be that the
> CMAKE_OSX_ARCHITECTURES is not being passed on to the Examples build
> phase, or something like that?
>
> Thanks,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>



More information about the vtk-developers mailing list