This page describes how to build Coin 3D for the Ubuntu 14.04 LTS operating system.
Install the required tools and development libraries:
sudo apt-get install git g++ mesa-common-dev libglu1-mesa-dev freeglut3-dev autoconf autogen doxygen
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
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.
The version of g++ distrubuted with Ubuntu 14.04 does not cleanly compile the Coin 3.1.3 source. Use the following patches to rectify this issue.
Note that these patches do not appear to be necessary if building on an Ubuntu 12.04 based platform.
In "include/Inventor/SbBasic.h", add the following #include reference:
#include <Inventor/C/errors/debugerror.h>
In "src/fonts/freetype.cpp", add the following #include reference at line 49:
#include <cstdlib>
Do this right before the extern "C" code.
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
Build the Coin library, libCoin.so:
make
To install the library, header files and documentation, do the following:
make install
The library will be installed in /usr/local/lib/libCoin.so. The header files will be installed in the /usr/local/include directory. HTML pages are populated in the /usr/local/share/doc/coin/html directory. The manual pages are installed into /usr/local/man.