This page contains additional information on how to compile vv statically. This requires recompiling qt, vtk, itk and vv.

1. QT

Download and unzip the sources.

1.1. Linux

export PATH=$PWD/bin:$PATH
../qt/configure -static -fast -opensource -release -prefix $PWD -nomake examples -nomake demos -no-libtiff && make && make install && make clean

The export and configure options are for:

1.2. Windows

Determine your PLATFORM, e.g. win32-msvc2008 for Microsoft Visual c++ 2008.

Hotfix required for MSVC++ 2010 (see Qt bug report).

In mkspecs/PLATFORM/qmake.conf, replace -MD and -MDd with -MT and -MTd, respectively. Note that this might be a problem.

Open Visual C++ command prompt and execute:

set PATH=%cd%\bin;%PATH%
..\qt\configure -static -fast -opensource -release -prefix %cd% -nomake examples -nomake demos -no-libtiff & nmake & nmake install & nmake clean

2. ITK

Download the sources.

Run CMake and set BUILD_SHARED_LIBS to OFF.

On Windows, replace /MD and /MDd with /MT and /MTd using cmake.

Compile.

3. FFMPEG (for MPEG support in VTK)

git clone git://git.videolan.org/ffmpeg.git
mkdir lin64
cd lin64
../ffmpeg/configure --disable-yasm --enable-static --disable-network --disable-zlib --disable-ffserver --disable-ffplay --disable-decoders --disable-shared --prefix=$PWD
make
make install

In VTK, set

CMAKE_CXX_FLAGS -D__STDC_CONSTANT_MACROS
FFMPEG_INCLUDE_DIR /home/srit/src/ffmpeg/lin64/include
FFMPEG_avcodec_LIBRARY /home/srit/src/ffmpeg/lin64/libavcodec/libavcodec.a
FFMPEG_avformat_LIBRARY /home/srit/src/ffmpeg/lin64/libavformat/libavformat.a
FFMPEG_avutil_LIBRARY /home/srit/src/ffmpeg/lin64/libavutil/libavutil.a
FFMPEG_swscale_LIBRARY /home/srit/src/ffmpeg/lin64/libswscale/libswscale.a

4. VTK

Download the sources.

Run CMake and set BUILD_SHARED_LIBS to OFF.

On Windows, replace /MD and /MDd with /MT and /MTd using cmake.

On Windows, add Imm32.lib Winmm.lib Ws2_32.lib to CMAKE_CXX_STANDARD_LIBRARIES.

Compile.

5. VV

Download the sources.

On Linux, add -static-libgcc -static-libstdc++ to CMAKE_EXE_LINKER_FLAGS using cmake (if these options are available on your compiler). In some cases, we have had some linking issues under Linux due to system libraries used by Qt; for example, CMAKE_EXE_LINKER_FLAGS was set once to "-static-libgcc -static-libstdc++ -ljpeg -lmng".

On Windows, replace /MD and /MDd with /MT and /MTd using cmake.

Compile.

vv-static (last edited 2011-08-24 11:58:35 by SimonRit)