Windows build » History » Version 69

« Previous - Version 69/98 (diff) - Next » - Current version
pospelov, 16 Jul 2015 10:50

Windows build

BornAgain compilation under Windows using Microsoft Visual Studio 2013.

see also Obsolete instruction for MSVC2012

To install x86

Install VS.NET2013
  • Install Visual Studio using our VS.NET2012 package

Download and install Microsoft Visual Studio 2013 Language Pack from
Set English in Tools -> Optionen -> Internationale

Install cmake

by running cmake-3.2.3-win32-x86.exe
select option "add cmake to the system PATH for all users"

Install NSIS

version NSIS 3.0b1

Install Qt5.5
  • Use online installer

Deselect 5.4, select 5.5 and msvc2013 32-bit and msvc2013 64-bit
Add to path c:\Qt\5.5\msvc2013\bin
Create environment variable QTDIR=C:\Qt\5.5\msvc2013

Create directory C:\opt\local_x86


Install boost

by running boost_1_58_0-msvc-12.0-32.exe
Install in the temporary directory C:\temp\boost_1_58_0
Copy content of the directory C:\temp\boost_1_58_0\lib32-msvc-12.0\* in the C:\opt\local_x86\lib\.
Copy whole directory C:\temp\boost_1_58_0\boost into C:\opt\local_x86\include\.

Install fftw3

download and unpack into temporary directory C:\temp\fftw3
generate lib file

open "VS2013 x86 Native Tools Command Prompt" from Windows menu All Programs/Microsoft Visual Studio 2013/Tools
cd C:\temp\fftw3
lib /def:libfftw3-3.def

copy c:\temp\fftw3\fftw3.h to C:\opt\local_x86\include\.
copy c:\temp\fftw3\libfftw3-3.lib to C:\opt\local_x86\lib\.
copy c:\temp\fftw3\libfftw3-3.def to C:\opt\local_x86\lib\.
copy c:\temp\fftw3\libfftw3-3.dll to C:\opt\local_x86\lib\.

Install GSL
  • All previous recepies disappeared from internet
  • Found out that one

Download from
Unpack to C:\temp\gsl-1.16
Copy directory C:\temp\gsl-1.16\gsl\x86\include\gsl to C:\opt\local_x86\include\.
Copy content C:\temp\gsl-1.16\gsl\x86\lib\* to C:\opt\local_x86\lib\.

  • Add c:\opt\local_x86\lib to PATH
Generate project file for MSVS 2013
  • Change to build directory

cmake -G "Visual Studio 122" -DCMAKE_INCLUDE_PATH=C:/opt/local_x86/include -DCMAKE_LIBRARY_PATH=C:/opt/local_x86/lib ../BornAgain

  • When open BornAgain.sln in Microsoft Visual Studio, select Release/32bit build type. Build project.
Making binary installer
  • After build is complete, installer is generated by running in the build directory the command

CPack -C Release

Useful programs

  • FarManager together with Conemy helps to work in console, for example it gives possibility to scroll long output

Install FarManager from
Install conemy