-
Notifications
You must be signed in to change notification settings - Fork 86
Guide to Compilation on Windows x86
The page reproduce step by step the successful compilation of PaGMO and PyGMO (1.1.5) on Win32 with Intel compiler. The set up used is:
- MSVC 11
- Boost library 1.53
- CMake 2.8.10
- Python 2.7
Download and install the latest Microsoft Visual Studio Express Edition for C++. The currently up-to-date is Visual Studio 2012 (MSVC 11), here the link to download
- Unarchive the latest version of boost (1.53.0 as of writing) into a directory of your choice (e.g. C:\boost, naming it like this will help CMake in the future).
- Start the Visual Studio Command Prompt (or the normal windows command prompt) and navigate to the folder where boost is.
- Run: bootstrap.bat to build b2.exe (previously named bjam).
- Run b2: b2 --toolset=msvc-11.0 --link=shared. Go for a coffee... when you come back go watching a movie or 2 because it takes a while...
The libraries are now built and copied automatically to C:\boost\stage\lib. Add this folder manually to the PATH.
To do this you need git available here or alternatively you can use Tortoise Git for Windows. You can now clone your local copy of PaGMO with the command
git clone [email protected]:esa/pagmo.git pagmo-code
this creates the subdirectory pagmo-code containing all the code.
Install CMake (Win32 autoinstaller) from http://www.cmake.org/cmake/resources/software.html
Now you are ready to build PaGMO/PyGMO source code.
- run CMake and generate the MSVC project files (Cmake->Configure->Generate)
- open the solution file PaGMO.sln located in pagmo-code\build
- ALL_BUILD is a project of your MSVC solution that build all the included projects
- RUN_TEST performs the sequence of unit tests
On my system the _problem project of PyGMO needs to be compiled with the /bigobj flag add it to: Properties->Configuration Properties->C/C++->Command Line.
Run the MSVC project INSTALL. Copy the folder \pagmo-code\PyGMO in your local Python folder \Python27\Lib\site-packages\ and it is done!