These instructions are for building quantlib 0.9.0 in the Visual Studio 2008 Express Edition interactive development environment.
To build quantlib you will need The Microsoft Windows SDK for Visual Studio 2008 . This is available as an option when installing Visual Studio 2008.
You will also need boost installed on your system. See the previous blog entry for a way to build and install boost 1.34.1 in a way that will work with quantlib.
Click here to download quantlib 0.9.0 from sourceforge.
The quantlib 0.9.0 code needs some changes to work with Visual Studio 2008. You can use this patch
to make these changes. Instructions for applying the patch are in the patch (a text file) itself.
At the top level of the quantlib source code tree ( QuantLib-0.9.0 ) is a "msvc solution" file: QuantLib_vc8.sln . Open this with msvc 2008 . You will be asked if you want to convert older solutions/projects to the latest version. Answer yes and let the conversion proceed.
You will need to let the compiler and linker know where to find the boost files. Do this by selecting "Tools/Options/Projects and Solutions/VC++ Directories" (starting from the menu bar and ending up in a dataform). Add C:\Boost\include\boost-1_34_1 to the include directories. Add C:\Boost\lib to the Library directories.
Change the Output_File under Project/Properties/Configuration_Properties/Librarian/General from .\lib\QuantLib-vc80-mt-gd-0_9_0.lib to .\lib\QuantLib-vc90-mt-gd-0_9_0.lib
Press F7 to compile and link.
1 comment:
hello
Do you know how long it will take for compile? I have built boost per instruction laid out in your blog and here as well: http://www.quantnet.org/forum/showthread.php?t=2221
I then initiated build in Visual Studio 2005 with "Include File" to include Boost directory as well. Build didn't spit out any error but has probably been running for 14 hours and still running as evident by icon on lower right status bar in Visual Studio 2005 (no error). Is that to be expected?
Many thanks!
Post a Comment