Imagine++ libraries are tested with Microsoft Visual Studio 2015 and minGW32, for which binaries are provided through installers.
Visual Studio 2015 is free and can compile 32 and 64 bits programs. Programs compiled in 32 bits still work on Windows 64 bits.
Requirements
Installers
For minGW:
For Visual Studio 2015:
Using Visual Studio instead of QtCreator
If you want to use Visual Studio instead of QtCreator as IDE:
- install CMake as above.
- install Visual Studio 2015, Community (https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx).
- install Qt5, 32 bits or 64 bits, for VS2015. Even if your Windows is 64 bits, you can still install the 32 bits version of Qt5. Install the minimum (Tools should be optional, but its unselection does not seem to work: installer bug?).
- install the corresponding Imagine++ package.
- find the location of QtGui5.dll in the installation directory of Qt (it should be in a subfolder called bin, such as: "C:\Qt\5.7.0\5.7\msvc2015\bin") and add this path to your PATH environment variable (Setting variables under Windows). Also create an environment variable
CMAKE_PREFIX_PATH
and set it as "C:\Qt\5.7.0\5.7\msvc2015\lib\cmake".
Binary packages
The installers just extract the prebuilt files and set the environment variable Imagine_DIR. You may choose to do that manually with one of the following archives:
Extract the archive in some location, and put the full path of the Imagine++ directory in the Imagine_DIR variable (Setting variables under Windows).
Compiling from source
If you need to recompile Imagine++, follow these steps. If the process fails somewhere, please check Troubleshooting.
1. Sources
Get the sources here http://imagine.enpc.fr/~monasse/Imagine++/downloads/Imagine++-4.3.2-Source.zip and decompress them.
2. Tools
You should already have Visual, CMake and Qt installed (see Requirements).
Optional:
3. Imagine++
- Use CMake to generate solution (file with extension .sln). Opening this file launches Visual.
After clicking configure, CMake proposes to create the build directory if it does not exist
Choose the generator (here Visual Studio 2013 in 32 bits)
Select the packages you will create (do not select NSIS if it is not installed)
Click 'Generate'
After clicking 'Generate', the solution project is created in the build directory.
- Select the Debug mode and build (F7).
After 'Build solution' (in 'Build menu), or F7, in Debug mode
- Select the Release mode and build again.
A new build should be done in Release mode
- Optionally, right click on the 'doc' project in the 'Solution explorer' window and build it (this needs doxygen installed).
To generate the HTML documentation, you have to explicitly build it
- Right-click on the 'PACKAGE' project in the 'Solution explorer' window and build it.
Building the packages
- This creates the binary archive (extension .zip) and the NSIS installer (.exe).
The two created packages
You can launch a test program by selecting it as 'StartUp Project' and pressing 'F5'
You're done! Follow the steps above to actually install Imagine++, using either the installer (exe) or the binary package (tar.gz).
Go to Usage and check the tests.