Compiling IT++ with Visual Studio Express 2013 and CMake 3.2.2

 

Install CMake for Windows: http://www.cmake.org/files/v3.2/cmake-3.2.2-win32-x86.exe.

Get IT++: http://sourceforge.net/projects/itpp/files/latest/download?source=files.

Unzip IT++ in c:\. I get c:\itpp-4.3.1 at the time of writing.

Since VS2013 has C99 library support (see http://blogs.msdn.com/b/vcblog/archive/2013/07/19/c99-library-support-in-visual-studio-2013.aspx) in order to avoid warning C4273: inconsistent dll linkage messages copy this updated CMakeLists.txt into c:\itpp-4.3.1.

Due to VS2013 C++11 conformance, you must add #include <algorithm> to the following files:

- matfunc.h

- eigen.cpp

- ls_solve.cpp

- qr.cpp

- svd.cpp

- svec.h

Create the folder c:\itpp-4.3.1\lib and copy into this folder the following files: blas_win32_MTd.lib, lapack_win32_MTd.lib, blas_win32_MT.lib, lapack_win32_MT.lib and libfftw3-3_win32.lib.

Copy fftw3.h in c:\itpp-4.3.1\itpp.

Open a console (Start/Command prompt) and navigate to c:\itpp-4.3.1. Create the subdirectory build (md build). Navigate to the build subdirectory (cd build) and enter the following command line:

cmake .. -DFFT_VENDOR=FFTW3 -DFFT_LIBRARIES=C:\itpp-4.3.1\lib\libfftw3-3_win32.lib -DFFT_INCLUDES=C:\itpp-4.3.1\itpp -DLAPACK_LIBRARIES=C:\itpp-4.3.1\lib\lapack_win32_MTd.lib -DBLAS_LIBRARIES=C:\itpp-4.3.1\lib\blas_win32_MTd.lib

At the end of the process, CMake has created a Visual Studio Express 2013 project inside the build subdirectory.

Copy the file C:\itpp-4.3.1\build\itpp\itexports.h into C:\itpp-4.3.1\itpp.

Open Windows Explorer and navigate to C:\itpp-4.3.1\build. Open itpp.sln (by double-clicking on the icon). Open transform.cpp and modify line 58:

Compiling and linking IT++ in 32 bits Debug mode:

Edit the Target Name in the project Properties:

Change the Program Database File name:

Change the Import Library File name:

Launch the building process by (menu Build/Build solution). There shouldn't be any errors and end up with the creation of the following files:

Copy the file itpp_debug_win32.lib into C:\itpp-4.3.1\lib and the file itpp_debug_win32.dll in C:\Windows\System32 for a 32bits Windows or in C:\Windows\SysWOW64 for a 64bits Windows.

Compiling and linking IT++ in 32 bits Release mode:

Change the Solution Configuration to Release.

Edit the Target Name in the project Properties:

Modify the Additional Dependencies like this:

Change the Import Library File name:

Launch the building process by (menu Build/Build solution). There shouldn't be any errors and end up with the creation of the following files:

Copy the file itpp_rel_win32.lib into C:\itpp-4.3.1\lib and the file itpp_rel_win32.dll in C:\Windows\System32 for a 32bits Windows or in C:\Windows\SysWOW64 for a 64bits Windows.

Get blas_win32_MTd.dll, lapack_win32_MTd.dll, blas_win32_MT.dll, lapack_win32_MT.dll and libfftw3-3_win32.dll and copy them into C:\Windows\System32 for a 32bits Windows or in C:\Windows\SysWOW64 for a 64bits Windows. You are now ready to develop IT++ project with Visual Studio 2013 Express which is going to be explained in the next page.

Compiling and linking IT++ in 64 bits Debug mode:

Copy the following files into c:\itpp-4.3.1\lib: blas_win64_MTd.lib, lapack_win64_MTd.lib, blas_win64_MT.lib, lapack_win64_MT.lib and libfftw3-3_win64.lib.

In the Solution Explorer windows (right) select itpp. Then, in the toolbar select Configuration Manager in the Solution Platforms listbox:

In the Configuration Manager window select New from the Platform listbox:

In the New Project Platform select x64 as new platform:

Edit the Output Directory and the Target Name in the project Properties:

Modify the Additional Dependencies like this:

Change the Program Database File name:

Change the Import Library File name:

Change the machine type to X64 in the Additional Options text box:

Launch the building process by (menu Build/Build solution). There shouldn't be any errors and end up with the creation of the following files:

Copy the file itpp_debug_win64.lib into C:\itpp-4.3.1\lib and the file itpp_debug_win64.dll in C:\Windows\System32 for a 32bits Windows or in C:\Windows\SysWOW64 for a 64bits Windows.

Contact