Installation for developers on Windows

Installation for developers on Windows

Installing MinGW and MSYS

Get the automated installer from Then do an installation of the current MingW release to c:/MinGW.

After that get and extract gcc-full-4.4.0-mingw32-bin-2.tar.lzma with 7-Zip over c:/MinGW

There is a little bug in the MingW distribution: In file: C:/MinGW/lib/gcc/mingw32/4.4.0/ you have to change line 11: from




[ from ]

To compile something with the just installed MinGW version, open a Windows command prompt and enter

set PATH=c:\MinGW\bin;c:\Qt\4.6.2\bin

To check, if the installed gcc is really a 4.4.0 version, run

gcc -v

You also have to install MSYS to compile some of the following libraries on Windows. Download the MSYS installer from the above mentioned MinGW site.

Qt 4.6.2

Download the "Qt: Framework Only" from ("Download Qt libraries 4.6.2 for Windows")

Uncompress the files to C:/Qt/4.6.2.

All other additional libraries should be installed to C:/libs


The Qt Widgets for Technical Applications ( can be downloaded from

The SVN version have to be used, it includes patches to compile with Qt 4.6. You can use cygwin ( to access the svn repository. Open a Cygwin shell and enter

cd /cygdrive/c/libs/
svn co

In file qwtconfig.pri: set "CONFIG += debug" to "CONFIG += release" in the Qt4/win32 sections.

To compile Qwt Open a Windows command prompt and enter, set the right paths

set PATH=c:\MinGW\bin;c:\Qt\4.6.2\bin

go to c:/libs/qwt-5.2.0 and run



The QwtPlot3D ( widget can be downloaded from

Extract to C:/libs/qwtplot3d-0.2.7

To compile qwtplot3d, change in C:/libs/qwtplot3d-0.2.7/ the line

CONFIG           += qt warn_on opengl thread zlib debug


CONFIG           += qt warn_on opengl thread zlib release

to build qwtplot3d in release mode, otherwise you will get error: "QWidget: Must construct a QApplication before a QPaintDevice".

Moreover, before compiling qwtplot3d and if you use mingw-gcc, you must change in the this (source

win32:TEMPLATE = vclib

to this:

win32:TEMPLATE = lib

For gcc 4.4.0, you also have to add the line

add #include <stdio.h>

to the file qwt3d_function.cpp.

To compile qwtplot3d run in a Qt command prompt:



A precompiles version of FFTW ( ) can be found at

Extract to c:/libs/fftw-3.2.2


Download Libconfig ( from

Extract contents c:/libs/libconfig-1.4.3

Change in file wincompat.h line 35:

#define atoll     _atoi64


//#define atoll     _atoi64

Run these commands in the MSYS shell:

cd /c/libs/libconfig-1.4.3
make install


Optionally the ZLib can be used with HDF5. The source is available on Extract the archive to c:/libs/zlib-1.2.4.

Start MSYS. Compile zlib with

./configure --static --prefix=/c/libs/zlib-1.2.4 --libdir=/c/mingw/lib --includedir=/c/mingw/include


Get the source from Read and follow the exact instructions in release_docs/INSTALL_MinGW.txt. You also have to remove testing scripts as written in the instructions.

To compile the HDF5 libs on MinGW, run this command in an MSYS shell:

export LIBS=-lws2_32
export PATH=.:/usr/local/bin:/mingw/bin:/bin
./configure --prefix=/c/libs/hdf5 --enable-cxx --with-zlib=/c/libs/zlib-1.2.4,/c/libs/zlib-1.2.4

without zlib

export LIBS=-lws2_32
export PATH=.:/usr/local/bin:/mingw/bin:/bin
./configure --enable-cxx --without-zlib --prefix=/c/libs/hdf5/

Then run

make install

To link the hdf5 libraries to a program use these parameters:

-lz -lhdf5 -l hdf5_cpp


Download TCLAP from and extract it to c:/libs/tclap-1.2.0


Get Boost from and extract it to c:/libs/boost_1_42_0

Compiling SNACS on Windows

You can use cygwin ( to access the SNACS svn repository. Open a Cygwin shell and enter

cd /cygdrive/c/libs/
svn co

Start a Qt command prompt. Go to the snacs/trunk directory and run

set PATH=c:\MinGW\bin;c:\Qt\4.6.2\bin
mingw32-make mocclean clean

Copy all necessary libraries to the trunk directory:

copy C:\MinGW\bin\mingwm10.dll release\
copy C:\MinGW\bin\libgcc_s_dw2-1.dll release\
copy c:\Qt\4.6.2\bin\QtCore4.dll release\
copy c:\Qt\4.6.2\bin\QtGui4.dll release\
copy c:\Qt\4.6.2\bin\QtOpenGL4.dll release\
copy C:\libs\qwt-5.2\lib\qwt5.dll release\
copy C:\libs\qwtplot3d-0.2.7\lib\qwtplot3d.dll release\
copy "C:\libs\libconfig-1.4.3\lib\.libs\libconfig++-8.dll" release\
copy C:\libs\fftw-3.2.2\libfftw3-3.dll release\

or simply call


To run SNACS, type

cd release


Eclipse with the CDT C/C++ environment can be used to develop program code. With the Qt integration kit the project file can directly be imported into the Eclipse workspace.

These parameters have to be set in Eclipse's project properties:

These parameters have to be set in Eclipse's run configurations properties:

For windows set these environment parameters

set QTDIR to


set PATH to




Important Notes

Debug or Release

Very important all libraries have to be build in the same mode, either release or debug.

More than one Qt DLL in PATH

"Note: HaiQ and Monkey Studio do not provide their own Qt DLLs. In my case, and with all my coworkers that results in a error such as Der Prozedureinsprungspunkt _Z11qUncompessPKhi wurde in der DLL QtCore4.dll nicht gefunden. This error comes if one has Qt DLLs, not build with MinGW on the system which are included in PATH. In my case it was Matlab or Miktex with the path C:/programme\Matlab\R2007a\bin\win32;C:/Programme\MiKTeX 2.7\miktex\bin. The only solution to this problem is to delete all paths from the PATH variable which contain a Qt DLL. This however can prevent these programms from starting. There are also projects, not build with Qt and not designed for Qt " => many QtCore4.dll in PATH (from Matlab, Nokia PC Suite, Eclipse...) Solution: set PATH="C:/MinGW\bin;C:/Qt\4.4.3\bin;"