Build Vaa3D on Windows (VS2008, QMake) - Vaa3D/Vaa3D_Wiki GitHub Wiki


Download Vaa3D Source Code

You need to check out source code from github code repositories, one for main Vaa3D code and one for some released plugins. You can follow the instructions for both Vaa3D program and its default plugins.

First, make sure you have GIT installed.

** Please use "--recursive" to clone the terafly submodule.

git clone --recursive https://github.com/Vaa3D/v3d_external.git
git clone https://github.com/Vaa3D/vaa3d_tools.git

Alternatively, you can clone both "v3d_external" and "vaa3d_tools" via GitHub Desktop, which can be obtained at: https://desktop.github.com/ .

Setup Symbolic Directory links for Building Plugins

The vaa3d_tools contains the majority of the plugins. The plugin sources are separated from the trunk, so in order to build the plugins in vaa3d_tools into the main program using QMake (If you are using CMake, you don't need to set up the folder cross linkes, you could configure the install directories during CMake configuration time. However, many of the existing plugins can only be built with QMake right now.) The following folder setting needs to be done:
cd vaa3d_tools
mklink /j v3d_main ..\v3d_external\v3d_main
mklink /j bin ..\v3d_external\bin
cd ..\v3d_external
mklink /j released_plugins_more ..\vaa3d_tools\released_plugins

Prepare the pre-requisites

**Qt**

Make sure you have the correct Qt 32bit or 64bit versions installed, as the "qmake" command below will have an impact of whether x86 or x86_64 (x64) MSVC project files would be generated! (Note: we recommend you use the Qt 4.7.2 binary downloadable from here https://qt-msvc-installer.googlecode.com/files/qt-win64-opensource-4.7.2-vs2008.exe as newer versions of Qt for Windows, e.g. 4.8, seemingly has changed the plugin interface which makes our plugins difficult to unload and re-instantiate!)

Boost library

Make sure you have "boost" library header files in the "v3d_main\common_lib\include" folder. If not, you can copy the "boost" folder into "v3d_main\common_lib\include" after you uncompress the boost_1_46_0.tar.gz file in the "v3d_main\common_lib\src_packages" folder.

TIFF library

Make sure you have libtiff header files in the "v3d_main\common_lib\include" folder. If not, you can copy all the tiff header (.h) files from the "tiff-4.0.2\libtiff" folder into "v3d_main\common_lib\include" after you untar the tiff-4.0.2.tar.gz file in the "v3d_main\common_lib\src_packages" folder.

FFTW library

Make sure you have fftw header file (fftw3.h) in "v3d_main\common_lib\include" folder. If not, you can copy "fftw3.h" from the "fftw-3.1.2\api" folder into "v3d_main\common_lib\include" after you untar the fftw-3.1.2.tar.gz file in the "v3d_main\common_lib\src_packages" folder. Pugins like istitch relies on fftw library.

_you can copy the header from "fftw_3.3_header" in the "v3d_main\common_lib\src_packages" folder. _

Build steps

To build Vaa3D (32bit and 64bit) on Windows 7 (64bit) using MS Visual Studio 2008 / Visual C++ Express / etc, please follow the instructions below:

Command Prompt

Open "Visual Studio 2008 Command Prompt" (for 32bit building) window or "Visual Studio 2008 x64 Win64 Command Prompt" (for 64bit building) window from "MS Visual Studio 2008 -> Visual Studio Tools" menu item in Windows Start menu

Compile via qmake

  • Enter "v3d_main\v3d" folder
  • Run "qmake -tp vc vaa3d_msvc.pro". This command creates a MS Visual Studio 2008 project file "vaa3d_msvc.vcproj" in "v3d_main\v3d" folder
  • Double click "vaa3d_msvc.vcproj" in "v3d_main\v3d" folder and open it in MS Visual Studio 2008
  • Choose building in "Release" mode in MS Visual Studio 2008
  • Choose building in "Win32" (for 32bit building) or "x64" (for 64bit building) mode in vaa3d_msvc Property Pages (by right-click v3d_msvc project icon in the left column in workspace in MS Visual Studio 2008) or just on the toolbar.
  • Choose menu "Build->Build Solution F7" to build the solution. A popup dialog will appear to ask to save solution file for this project. Just click "OK" in this dialog
  • Now Vaa3D has been built. You can find the executable from the location "v3d_main\v3d\release\vaa3d_msvc.exe".
  • To run the executable, you will have to make the dependency Qt library files etc available to it. Thus the simplest way is to download the pre-generated binary package of Vaa3D Windows version, unzip the package, and then use the "vaa3d_msvc.exe" file you have just generated to replace the one (with the same file) in the unzipped package (which already have all dependency files included). Of course, since the pre-generated Vaa3D Windows version may be produced from a different Qt version, a different MSVC version, a different Release or Debug version, and may have different Vaa3D plugins, you need to make sure you have consistent files. A simple way is to rebuild everything using your own local settings, and put the necessary files (see the pre-generated binary package for the file list) under the same folder to run!
    *Note that if a previous MSVC solution file already exists, and you constantly have trouble to link to the latest compiling modules successfully, then you may need to manually delete the previously generated MSVC solution file first, and then use the "vaa3d_msvc.vcproj" following the above instructions!

The building method works for both 32bit and 64bit buildings.

If you are using Visual Studio 2010, then you may need to rebuild Qt before you build Vaa3D.

⚠️ **GitHub.com Fallback** ⚠️