Menu

Building_Coin

Building Coin

The official source code for Coin 3D resides on Bibucket (https://bitbucket.org/). However, Wizzer Works has cloned this source to https://sourceforge.net/projects/coin3d/ in order to control the integrity of the software that works with Magic Lantern (version 3.1.3).

Coin 3D for Linux

This section describes how to build Coin 3D for the Ubuntu 14.04 LTS operating system. There are three approaches that may be taken:

  1. Build from Coin3D Sourceforge project sponsored by Wizzer Works (https://sourceforge.net/projects/coin3d/).
  2. Build from the original source code tar package distribution, or
  3. Build from Bitbuket Mercurial repositories.

The first approach is strongly reccomended because it is based on the tar package distribution from the last official release, prior to moving the source to the open source community. The Wizzer Works code base also contains all the modifcations made to work with the Magic Lantern Inventor and Rehearsal Player tagets.

The Bitbucket source code is undergoing build environment changes, moving to the the CMake toolchain. The Autoconf build environment is not being supported and is currently broken.


Building from Coin3D Sourceforge Project

The build instructions for the Linux Platform can be found at https://sourceforge.net/p/coin3d/wiki/Coin3D_Build_Instructions_For_Linux/.


Building from tar Package

The Coin 3D package can be downloaded from the Bitbucket account: https://bitbucket.org/Coin3D/coin/downloads. The package is Coin-3.1.3.tar.gz.

Unpack the tar File

Do the following to extract the source:

tar -xvzf Coin-3.1.3.tar.gz

Patch files

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.

Patch SbBasic.h

In "include/Inventor/SbBasic.h", add the folling #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 coin-build
cd coin-build
../Coin-3.1.3/configure --enable-html --enable-man

Build the Coin Library

Build the Coin library, libCoin.so:

make

Install the Coin Library

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.


Building from Mercurial Repositories

The default Autoconf build for Coin 3D is broken. Luckily there is a build environment using the cmake tool and is located in the CMake branch. Note that the CMake branch does not install everthing required to support the GUI interfaces (i.e. SoXt, SoQt, etc.).

To build Coin 3D for Linux, do the following:

Install Mercurial

The Coin 3D source code is managed using the Mercurial toolchain.

$ sudo apt-get install mercurial

Install Latest Version of cmake

Download self-extracting shell script from https://cmake.org/download/. These instructions used the cmake-3.3.2-Linux-x8664.sh script on an Ubuntu 14.04 LTS 64-bit machine.

$ sudo sh cmake-3.3.2-Linux-x86_64.sh
$ sudo mv cmake-3.3.2-Linux-x86_64 /opt
$ sudo ln -s /opt/cmake-3.3.2-Linux-x86_64/bin/cmake /usr/local/bin/cmake

Retrieve Source Code

Obtain the cmake branch from the Bitbucket repository with command

$ hg clone http://bitbucket.org/Coin3D/coin -r CMake

Run cmake

Use cmake to generate the Makefiles.

$ mkdir coin-build
$ cd coin-build
$ cmake ../coin

Build Source

The libCoin.so will be built in the coin-build/src directory.

$ make

Install the libraries

To install the Coin 3D libraries and header files, 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. Manual pages are populated in the /usr/local/share/doc directory.


Linux Coin 3D GUI Libraries

Coin 3D supports Graphical User Interface libraries for Linux. These are

  • SoXt - A GUI library for X11 Motif
  • SoQt - A cross-platform GUI library

These libraries may be built by following the corresponding build instructions:


Coin 3D for Windows

This section describes how to build Coin 3D for the Windows platform.


Building from Coin3D Sourceforge Project

The build instructions for the Linux Platform can be found at https://sourceforge.net/p/coin3d/wiki/Coin3D_Build_Instructions_For_Windows/.


Windows Coin 3D GUI Libraries

TBD.


Related

Developer Wiki: Developer_Documentation
Developer Wiki: SDK_Build_Environment_for_Linux_Platform
Developer Wiki: SoQt_Build_Instructions_For_Linux
Developer Wiki: SoXt_Build_Instructions_For_Linux

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.