Menu

Coin3D_Build_Instructions_For_Mac

Coin 3D Build Instructions for Mac

This page describes how to build Coin 3D for the Macintosh operating system.

Note: The Xcode project in the build directory is currently broken. These instructions use the autoconf toolchain.

Build Dependencies

Install the required tools and development libraries:

Mac Toolchain

Download Xcode and install using App Store (see https://developer.apple.com/support/xcode/).

Doxygen

Download the doxygen DMG package from here. The current package that has been tested is Doxygen-1.8.14.dmg.

Double-click on the downloaded package and follow the instructions presented by the installer (drag Doxygen application to Applications folder).

Add the doxygen binary to your PATH:

export PATH=/Applications/Doxygen.app/Contents/Resources:$PATH

Download the Source

The Wizzer Works Coin 3D source code resides on Sourceforge (https://sourceforge.net/projects/coin3d/). It is in a Git repository and the following command can be used to retrieve the source:

git clone git://git.code.sf.net/p/coin3d/code coin3d-code

Use the Magic Lantern Branch

To build the source modified for the Wizzer Works Magic Lantern project, switch to the magiclantern branch:

git checkout magiclantern

Note that the master branch contains the source from the original Coin3D v3.1.3 tar package. The master branch will not be modified unless it is necessary to be maintained (i.e. bug fixes) outside the scope of Magic Lantern.

Patch files

The version of g++ distrubuted with Xcode does not cleanly compile the Coin 3.1.3 source. Use the following patches to rectify this issue.

Patch SbBasic.h

In "include/Inventor/SbBasic.h", add the following #include reference:

#include <Inventor/C/errors/debugerror.h>

Patch freetype.cpp

In "src/fonts/freetype.cpp", add the following #include reference at line 49:

#include <cstdlib>

Do this right before the extern "C" code.

Configure the Build Directory

Build the libraries and distribution elements (i.e. documentation) in a separate directory. Be sure to enable the HTML and man page generation.

mkdir coin3d-build
cd coin3d-build
../coin3d-code/configure --enable-html --enable-man

Other useful configure options include:

  • --enable-debug=no
  • --without-framework

Build the Coin Library

Build the Coin library, libCoin.dylib:

make

Install the Coin Library

To install the library, header files and documentation, do the following:

sudo make install

Note: you may need to create the /Library/Frameworks/Inventor.framework/Versions/C/Resources/include directory by hand for install to complete successfully:

sudo mkdir /Library/Frameworks/Inventor.framework/Versions/C/Resources/include

The library and documentation will be installed in /Library/Frameworks/Inventor.framework.


Related

Wiki: Home

MongoDB Logo MongoDB