Skip to content

Installing Coin3D For Windows64

ilescener edited this page Apr 3, 2017 · 4 revisions

Coin is a high-level 3D graphics toolkit for developing cross-platform real-time 3D visualization and visual simulation software. This toolkit is implemented as a library. The Coin library is used within Tonatiuh to implement the programs 3D views of the concentrating system being simulated and to provide the architecture for the underlying 3D scene graph.

Here you will find instructions to install the Coin library in your computer and make this library available for the development of Tonatiuh.

Details

Since the Coin library binary installers for Windows, available at the Coin 3D website, are only valid for Visual C++ and we need to use the MinGW C++ compiler in order to be able to use the open source version of the Qt libraries, we need to build the Coin library from the source code.

Download the latest realese of the Coin source package, currently Coin 3.1.3. To do it, click on the following link to go to the "Coin 3.1.3" webpage of the Coin website. Once you reach the webpage, click on the link titled "Get Coin 3.1.3 for all platforms" (see Figure 1). This will start the downloading of the Coin source package. When prompted if to open or to store the file in your computer, select the appropriate option to store the file in your computer.

Figure 1. View of the "Coin 1.3.1" webpage.

Once the coin source code package is on your PC, place it into the user directory under your MSYS folder. This will typically be C:\sde\mingw64\msys\home\username.

Open an MSYS shell console. Navigate to your MSYS user directory and extract the archive by typing:

tar -zxvf Coin-3.1.3.tar.gz

Using the MSYS shell navigate to just created Coin-3.1.0 directory. To build the library in release mode type:

export QTDIR=/c/sde/qt
export COINDIR=/usr/local
export INCLUDE=/usr/local/include:/c:/sde/mingw64/include
./configure --disable-msvc --enable-debug=no --enable-symbols=no --build=x86_64-w64-mingw32

This will start the configuration process. Depending on your computer, this process may take some time to finish. When it does, a set of messages indicating the Coin configuration settings will be displayed at MSYS shell (see Figure 2).

Figure 2. MSYS shell messages shown when the configuration process ends.

This will create a directory called Coin-3.1.3 in your user directory. To solve some compilation errors, change the following:

  • File "include/Inventor/SbBasic.h" (line 26):
  +#include <Inventor/C/errors/debugerror.h>
  • File "include/Inventor/C/glue/spidermonkey.h" (line 50):
  -typedef long jsword 
  +typedef long long jsword
  • File "src/threads/thread.cpp" (line 157):
  -return (unsigned long) val;
  +return (unsigned long long) val;
  • File "src/threads/thread_win32.icc" (line 32):
  -return (DWORD) thread->func(thread->closure);
  +return (unsigned long long) thread->func(thread->closure);
  • File "src/vrml97/JS_VRMLClasses.cpp" (lines 667, 683, 1427, 1437 ):
  -unsigned long 
  +unsigned long long
  • File "src/fonts/freetype.cpp" (line 35):
  +#include <cstdlib>
  +#include <cmath>
  • File "src/foreignfiles/SoSTLFileKit.cpp" (lines 600, 601, 602, 604):
  -long
  +long long

Then, edit libtool file to create Coin3D shared library correctly. Open libtool file and go to 582 line:

-$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+$EGREP -e 'file format pe-x86-64' >/dev/null ; then

Now, you can install the Coin3D library by typing:

mingw32-make 
mingw32-make install

The installation process may take some time. At the end of the installation process, the Coin dynamic library "libCoin-60.dll" and the file "coin-config" will be installed at the folder "C:\sde\mingw64\msys\local\bin" and the Coin library files "libCoin.dll.a" and "libCoin.la" will be installed at the folder "C:\sde\mingw64\msys\local\lib". In addition, the file "Coin.pc" will be installed at the folder "C:\sde\mingw64\msys\local\lib\pkgconfig" and the necessary include files will be installed at the folders "C:\sde\mingw64\msys\local\include" and "C:\sde\mingw64\msys\local\include\Inventor".

Once the Coin library is installed, the next step in setting up the Tonatiuh development environment is to install the SoQt library. To do it, follow the instructions in the following wiki page: Installing SoQt


Windows 64 Bit Configuration | Wiki Home

Clone this wiki locally