Clone wiki

Coin / Building instructions

You are here: You are here: HomeDocumentationWindows information page → Building instructions

Building instructions

How to build Coin3D on Windows using Visual C++ project files

The Coin3D libraries can be built using the supplied Visual C++ project files. This documentation describes how to build them using Visual C++ 6.0, Visual C++ 2003 and Visual C++ 2005. Alternatively, Coin can be built without project files, a method that is not restricted to specific versions of MSVC and does not require conversion and editing of project files.

One reason for wanting to build the libraries yourself is if you want to use a different version of the C runtime library than the one the libraries are built against. The release versions of these libraries (sowin1.dll, coin2.dll, simage1.dll) have been compiled against the multithreaded DLL version of the C runtime library. The debug versions of these libraries (sowin1d.dll, coin2d.dll, simage1d.dll) have been compiled against the debug multithreaded DLL version of the C runtime library.

To build the complete set of libraries

1. If you have not already done so, get the Coin source code.

2. Choose a directory for your Coin installation. The path to the directory should not contain spaces. Something like C:\Coin3D will work. The directory must exist before you compile Coin.

3. Define an environment variable named COINDIR to point to the directory you created. You can do this from Control Panel | System | Advanced | Environment Variables | New.


4. Navigate to the subfolder of build/ folder in the Coin source directory that corresponds to your version of Visual C++ and open the coin2.sln for Visual C++ 2003 and 2005 or coin2.dsw for Visual C++ 6.0.


5. Choose Build | Build Solution for Visual C++ 2003 and 2005 or Build | Batch Build for Visual C++ 6.0. Check the build log and confirm that there were no errors, and check the $COINDIR to see if the installation files were copied there. The $COINDIR should now contain a bin/ folder with the Coin DLL, a lib/ folder with the Coin lib file, an include/ folder with the headers, and a data/ folder with some iv files. If it does you have successfully built and installed Coin.


The build process for SoWin and SoQt is the same as for Coin. These libraries also depend on the $COINDIR variable. The DLL, lib and header files will be copied to the $COINDIR/bin, $COINDIR/lib and $COINDIR/include folders.