Install OpenSceneGraph in mac lion

This post describe the problem when compiled the OSG in mac lion, a simple step by step to compile osg is here.

1. download the latest OSG code by svn:

svn checkout http://www.openscenegraph.org/svn/osg/OpenSceneGraph/trunk OpenSceneGraph-SVN

2. change to OSG directory

cd OpenSceneGraph-SVN

3. prepare jasper library by a tricky

sudo ln -s /opt/local/include/jasper /Library/Frameworks/UnixImageIO.framework/Headers/jasper

4. change the cmake

cmake -D BUILD_OSG_APPLICATIONS:BOOL=OFF \
-D CMAKE_OSX_ARCHITECTURES:STRING=x86_64 \
-D OSG_WINDOWING_SYSTEM:STRING=macosx10.7 \
-D OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX:STRING=imageio \
-D OPENTHREADS_ATOMIC_USE_MUTEX:BOOL=ON \
.

5. make & install

make
sudo make install


已发布

分类

,

来自

标签:

评论

《 “Install OpenSceneGraph in mac lion” 》 有 2 条评论

  1. Huey 的头像
    Huey

    That’s great. I was able to compile and install. Thank you very much!!
    I did changed -D BUILD_OSG_APPLICATIONS:BOOL=ON to get some executables for testing. However when I ran osgviewer with cow.osg I received this error:

    View::setUpViewAcrossAllScreens() : Error, no WindowSystemInterface available, cannot create windows.
    Viewer::realize() – failed to set up any windows

    Any suggestions? Thanks

  2. wlx 的头像
    wlx

    You can try the compiling with Xcode, just replace step4 with:

    mkdir Xcode
    cd Xcode
    cmake -D BUILD_OSG_APPLICATIONS:BOOL=OFF -D CMAKE_OSX_ARCHITECTURES:STRING=x86_64 -D OSG_WINDOWING_SYSTEM=Cocoa -D OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX:STRING=imageio -G Xcode ..

    then compile OSG in Xcode.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注