Building Coin3d and SoQt on MinGW

From ASCEND
Jump to: navigation, search

Coin3d and SoQt are software libraries that facilitate cross-platform 3D graphics based on the original SGI-developed code named Open Inventor. Building an operational Coin3d/SoQt environment on MinGW is non-trivial and not actively supported by the Coin3d developers. We present our findings here based on developing under Windows 7 (64-bit) using the latest MinGW 32-bit release with GCC 4.5.2

Hopefully we will be able to shortly provided updated binary installers for Coin3d and SoQt on MinGW based on the following.

Coin3d

Building Coin3d was relatively not as difficult as building SoQt, because Coin3d is relatively self-contained.

First download Coin-3.1.3.tar.gz and save it to your MinGW/MSYS home directory.

tar zxvf Coin-3.1.3.tar.gz
cd Coin-3.1.3
./configure --prefix=/home/john/install_temp
make -j2
make install

Qt

Building SoQt requires the Qt development environment to be installed on your machine. We used the latest 2010.05 version of Qt (from this page), which was installed in its default location c:\Qt\2010.05.

SoQt

Building SoQt on Windows 7 via MinGW/MSYS requires some tricky setting of environment variables. We found that the following worked (we're still testing though).

First download SoQt-1.5.0.tar.gz to your MinGW/MSYS home directory.

export QTDIR=/c/Qt/2010.05/qt
export QT4_LIBS="-L${QTDIR}/lib -lQtGui4 -lQtCore4 -lQtOpenGL4"
export QT4_CFLAGS="-DQT_SHARED -I${QTDIR}/include -I${QTDIR}/include/QtOpenGL -I${QTDIR}/include/QtCore -I${QTDIR}/include/QtGui"
export PATH=$PATH:${QTDIR}/bin

Then, to configure the build,

tar zxvf ~/SoQt-1.5.0.tar.gz
cd SoQt-1.5.0
./configure --prefix=/home/john/install_temp

We finally saw the output:

SoQt configuration settings:
  Open Inventor brand:  Coin
  Static Materials:     Yes
  Installation Prefix:  /home/john/install_temp

To complete the build:

make -j2
make install

Testing is continuing. We hope to provide an automated installer containing the resulting DLLs etc.

See also these instructions from Tonatiuh.

WARNING if you do not set the correct PATH, resulting programs will not run correctly. You should have c:\Qt\2010.05\qt\bin in your PATH but not c:\Qt\2010.05\bin. If you make this mistake, you will receive an error message about a problem with a missing symbol 'Z13qFlagLocationPKc' in QtCore4.dll. (See also this forum post).