'VTK'에 해당되는 글 1건

  1. 2011.08.04 Compile issues of PCL 1.1.0 (with VTK+X11) on OSX 3

Compile issues of PCL 1.1.0 (with VTK+X11) on OSX

OSX 2011. 8. 4. 14:10

sudo ./bootstrap.sh --prefix=/usr/local/boost_1_42_0

bjam toolset=darwin variant=release threading=multi link=static

bjam toolset=darwin variant=release threading=multi link=shared

sudo bjam install

1. Download and install all dependencies: http://pointclouds.org/downloads/macosx.html

  • boost 1.46.1 (MacPorts)
  • Eigen 3.0.0
  • FLANN 1.6.8
  • CMinPack 1.1.3
  • QHull 2010.1.3 (MacPorts)
  • OpenNI
    • LibUSB (MacPorts)
    • OpenNI 1.1.0.41 (patched) Note: This is a command-line install and permissions need to be fixed before running ./install
    • Sensor 5.0.1.32 (patched) Note: This is a command-line install and permissions need to be fixed before running ./install
      Otherwise the libraries can't be loaded and you get the following error:
      $ /usr/local/bin/octree_viewer
      dyld: Library not loaded: ../../Bin/Release/libOpenNI.dylib
      Referenced from: /usr/local/bin/octree_viewer
      Reason: no suitable image found.  Did find:
      /usr/lib/libOpenNI.dylib: open() failed with errno=13
      Trace/BPT trap
      
  • wxgtk (MacPorts)
    $ sudo port install wxgtk
    

2. Download VTK source, compile and install it: http://www.vtk.org/VTK/resources/software.html

Follow README.html for compiling on UNIX / Cygwin / Mac OSX:

$ ls -d VTK
VTK/
$ mkdir VTK-build
$ cd VTK-build
$ ccmake ../VTK

Within the CMake configuration:

------------------------------------------------------------

CMAKE options;
OPENGL_INCLUDE_DIR = /usr/X11R6/include
OPENGL_gl_LIBRARY = -L/usr/X11/lib/ -lGL
OPENGL_glu_LIBRARY = -L/usr/X11/lib/ -lGLU
OPENGL_xmesa_INCLUDE_DIR = /usr/X11R6/include
CMAKE_OSX_ARCHITECTURES:STRING = i386;x86_64
VTK_USE_CARBON = OFF
VTK_USE_COCOA = OFF
VTK_USE_X = ON

------------------------------------------------------------

3. Configure PCL (compiled with gcc-4.2.1/g++-4.2.1)

Within the CMake configuration:

VTK_DIR:/usr/local/lib/vtk-5.6
wxWidgets_CONFIG_EXECUTABLE:/opt/local/bin/wx-config
wxWidgets_wxrc_EXECUTABLE:/opt/local/bin/wxrc
OPENNI_INCLUDE_DIR = /usr/include/ni/
CMAKE_CXX_LFAGS = -I/usr/include/ni/
CMAKE_C_LFAGS = -I/usr/include/ni/

: