[vtkusers] HOWTO: VTK 4.4.2 in MacOSX 10.4
Mike Jackson
maillist at bluequartz.net
Fri Sep 30 09:51:52 EDT 2005
Thanks.. Maybe now I can compile it. Is there any chance of rolling
these changes into the 4.4.2 branch of CVS? Seems like a large
barrier to entry for mac users to overcome, especially those that do
not have a lot of c/c++ experience.
Cheers
Mike Jackson
On Sep 30, 2005, at 2:44 AM, Paulo Tribolet Abreu wrote:
> Hi:
>
> I've just successfully compiled VTK 4.4.2 under MacOSX 10.4 and I'd
> like to report what I had to change. Probably there are more
> elegant ways to do this, but this one worked for me (without Java,
> Tcl/Tk and Python).
>
> GCC:
> ====
>
> * First, make sure you have gcc 4.0:
>
> paulomac:~ paulo$ gcc_select
> Current default compiler:
> gcc version 4.0.0 (Apple Computer, Inc. build 5026)
>
> * If not, do
> paulomac:~ paulo$ sudo gcc_select 4.0
>
>
> CMake 2.0.6:
> ============
>
> * cmDynamicLoader.cxx: line 185
> change...
> NSUnLinkModule(lib, FALSE);
> to
> NSUnLinkModule((NSModule)lib, FALSE);
>
>
> VTK 4.4.2:
> ==========
>
> * Comment out the indicated line from the following files:
> vtkMacros.cmake:22
> Common/CMakeLists.txt:259
> Filtering/CMakeLists.txt:130
> Graphics/CMakeLists.txt:196
> Hybrid/CMakeLists.txt:106
> IO/CMakeLists.txt:176
> Imaging/CMakeLists.txt:149
> Rendering/CMakeLists.txt:343
>
> * Change
> #ifdef __APPLE_CC__
> to
> #if 0
> so that the code that follows is not compiled, from
> the following files:
> Common/vtkAbstractMapper.cxx:33
> Filtering/vtkCardinalSpline.cxx:27
> Graphics/vtkAppendFilter.cxx:32
> Hybrid/vtk3DSImporter.cxx:37
> IO/vtkBMPReader.cxx:34
> Imaging/vtkBooleanTexture.cxx:29
> Rendering/vtkAbstractMapper3D.cxx:24
> Rendering/vtkTkWidgetsInit.cxx:27
>
> * Wrap the contents of the file
> Rendering/vtkOSXRenderingTclInit.c
> in a #if 0 ... #endif.
>
> * Edit
> <CMake install prefix>/share/CMake/Modules/
> CMakeDefaultMakeRuleVariables.cmake
> and change the following lines
>
> IF(CMAKE_COMPILER_IS_GNUCXX)
> SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "$
> {CMAKE_CXX_CREATE_SHARED_LIBRARY} -lgcc")
> ENDIF(CMAKE_COMPILER_IS_GNUCXX)
>
> to
>
> IF(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
> SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "$
> {CMAKE_CXX_CREATE_SHARED_LIBRARY} -lgcc")
> ENDIF(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
>
> (Thanks to David C. Thompson for this one
> <http://public.kitware.com/pipermail/vtkusers/2005-May/079721.html>)
>
>
>
> With these changes, VTK compiled fine and the Cone5 and Cone6
> Tutorials work fine, with mouse and keyboard input. This is the
> only test I have tried so far.
>
> Have fun,
>
> Paulo
>
>
> _______________________________________________
> This is the private VTK discussion list.Please keep messages on-
> topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
---
Mike Jackson
mike _at_ bluequartz dot net
More information about the vtkusers
mailing list