MIN-Faculty
Department of Informatics
Scene analysis and visualization (SAV)

Howto: Use the VIGRA on Windows with MS Visual Studio 2005


If you plan to use the VIGRA on any Linux, UNIX or Mac OS, this howto cannot help you. Please take a look at the: VIGRA-Reference-Manual (Installation) for more information about these platforms.


Microsoft Visual Studio is a commercial IDE, but depending to contracts between your university, you may get it free as a part of the so-called MS Academic Alliance. You may use this version as long and as often as you want, but it is strictly prohibited to create commercial applications using this version of Visual Studio. The Visual Studio (c++ part) includes the MS C++ compiler, which is one of the fastest on Windows. On the other hand, historically, this has also been one of the worst compilers comparing to the GCC on UNIX/LINUX when talking about standard-conformity. That also meant other failure messages, different compilation behaviour, no makefiles but projectfiles and so on... Since version 2003, the support of the C++ standard has grown fast, so that you do not need many changes to get your GCC code running on Visual Studio. Another argument for the IDE is the well integrated Debugger, the automatic code-completion and syntax-highlighting just to mention some.
The followoing steps describe what you have to do, when you want to use the vigra with this IDE.

1. Download and unzip

  1. First of all, please download the VIGRA-Paket (1.6.0) including all sources and dependencies here
  2. Now, unzip the downloaded archive to any path you want. All paths inside the package are relative, so it does not matter, where you put it. For this howto, we assume that it was unzipped into the folder
    C:\development\vigra-1.6.0-complete

2. Building the dependent libraries

For this howto, we build all dependencies as static libraries on our own using the MS C++ compiler. This is important, because we want to build the VIGRA-Import/Export library as a static library and as a dynamic library.

To start the automated build procedure you may simply double click on the "BuildAll" batch file or type:

C:\development\vigra-1.6.0-complete\BuildAll.bat

3. Better safe than sorry

Just to get sure, that we have everything at the right place, let us take a look at the contents of the folder C:\development\vigra-1.6.0-complete\libs. You should see the following files:

   libfftw.lib                (fftw  - Release - stat. library )
   libjpeg.lib                (jpeg  - Release -               )
   libpng.lib                 (png   - Release -               )
   libtiff.lib                (tiff  - Release -               )
   zlib.lib                   (zlib  - Release -               )

   vigraimpex.lib             (vigra - Release - stat. library )
   vigraimpex_debug.lib       (vigra - Debug   - stat. library )

   vigraimpex.dll             (vigra - Release - dyn. library  )
   vigraimpex.dll.exp         (                - Interface-def.)
   vigraimpex_dll.lib         (                - Include lib.  )
   vigraimpex_debug.dll       (      - Debug   - dyn. library  )
   vigraimpex_debug.dll.exp   (                - Interface-def.)
   vigraimpex_debug_dll.lib   (                - Include lib.  )

If the directory is empty or some files are missing, the most likely reason will be that the batch-file did not find the correct Visual Studio Environment variables. You can correct this on your own - just edit line 4 of the batch-file to the correct path of the file vsvars32.bat!

4. Building the examples

After the successful execution of step four, you may now want to compile the vigra examples and try them out!