• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

TUTORIAL: Boost 1.37.0 + QuantLib 0.9.6 and Visual Studio 2008

Minor update for boost 1.37.0

You can use boost 1.37.0 ( released November 3rd, 2008 ) in place of boost 1.36.0 in the instructions in the previous post. No modifications needed other than the obvious changing of 1.36 to 1.37 where appropriate.
 
Hello Everyone,


I am trying to build Boost for visual studio 2008 express edition and I am facing the same problem as CodingForFun with the SDK. I have followed the link to VsSDK_sfx and when I trying yo install the SDK I have a message that tells me I need Visual Studio Standard Edition installed.

I Have seen CodingForFun get through the same issue. How did you get through it?

Thanks for your help.
 
Hi tikam,

If you are using Visual Studio Express Edition, you should install the SDK as part of the express edition install process. There is no need to do a separate SDK install. If you have already installed Visual Studio Express Edition, you may already have the SDK installed. If not, the simplest ( though not necessarily the fastest ) way to get everything installed as needed is probably to uninstall and then reinstall express edition.

Let me know if you run into more problems.

- dave
 
All right Dave,

I have uninstalled VS, I 'll try again.
Tell you, if it does not work any better.
Thks.
 
Hello Dave,

I have installed again MSCV but the set engine did not propose me to install the sdk. The only option available was the SQL server which has failed to install anyway for unknown reason.
I have followed your instructions anyway but bjam has returned me:
-1952 failures to update
-1842 skipped targets.

In C:\boost directory there is nothing but an empty lib folder.

Could you help me with that please?

Thanks.

Tikam.
 
Hi tikam,

Have you made any progress on getting Quantlib working? I have some time to follow up but before starting, can you tell me where things stand now?

- dave
 
Hello Dave,

Nothing new on boost, I have moved to another project in C# so I did not have much time for it.
As i told you, I was not offer the option to choose to install or not the sdk when I have re-installed visual studio. So i still don't know if it has failed to compile because of that or for any other reason.
I have seen that I have already some SDK directories -which are not empty- on my drive. I guess, it is at least partially installed.
I will try to download again MSVC 2008 from an other source. If I failed to install correctly boost again, maybe it will be a sign that I have to move to the standard edition.

I will keep you informed as soon as I have something new.

Thx.

Tikam.
 
If you do a search on 'libboost_unit_test_framework-vc90-mt-gd-1_35.lib' do you find it on the machine? Sometimes unless you run BJAM complete or install, I forget which, it does not get posted to the lib directory. If you have it on the PC make sure it is not just staged.

Dave
 
How to link my own project to QuantLib?

:dance:
Hey David, thanks for all these detailed instruction. It seems to work well with the examples, yet I have difficulty in using QuantLib in my own projects.

I've made the following attempts in my own project:
(1) #include <ql/quantlib.hpp>
(2) Set my project depends on QuantLib

Then it reports fatal error C1083: cannot open open include file: "ql/quantlib.hpp" No such file or directory. What's the problem?
:dance:

Could you give a tutorial on how to configure a project so that it can access QuantLib? Thanks
 
Hello Dave,

Your 're right, it seems there is no such file as 'libboost_unit_test.lib' in my drive.
This lib is built by bjam, right? It is not in the files in boost when one downloads it?
Cause I have checked those files and it is not there either.

I have downloaded again MSVC (I have checked this time that the SDK was included), the application has proposed me to repair it instead. It seems the SDK was not properly installed at first.

I'll make on another try with my brand new SDK.

Thks again,

Tikam.
 
Hello Dave,

Boost has compiled without any trouble, i think it was the SDK.

The patch has worked fine, except for one file (the solution file has not been saved ), nevertheless, MSVC could run the solution.

Many thanks again, your post was really needed.

Bye
 
build taking >14 hours still running.

hello

Do you know how long it will take for compile? I have built boost per instruction laid out. All good. But...

I then initiated build (for QuantLib_vc8) 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!
 
compile time

Compile time will be dependent on how powerful your hardware is. What kind of machine are you running? It's been a few days since you posted your question. How are things working out?

Also, if I remember correctly, the default compilation process included running the test suite after the creation of the libraries & executables. The test suite execution takes *much* longer if you build in debug mode. This is why I suggested changing the active solution in the most recent set of instructions:

Change the active solution from "Debug CRTDLL" to "Release CRTDLL" by selecting "Build/Configuration Manager" in VS2008

If it is the build process itself that is taking the time, then 14 hours is plausible if you are running a slower machine. It's been a couple of months since I built quantlib but I remember it taking a couple of hours to build the executables and then about an hour to run the test cases on a medium speed core2 duo box. Prior to that I was running a 2.8 ghz / 1 gb pentium 4 and it took 4 or 5 hours to do the build. All this is from memory so don't be too surprised if your results vary.

Also, I was using Visual Studio 2008, express edition ( the free version). This may not be necessary but if possible, you might want to consider switching just to eliminate a source of variation of results.

Hope this helps.

Happy New Year!

- Dave
 
Hi everyone!

Hopefully someone can help me..

I have downloaded Boost 1.37.0, Quantlib 0.9.7 and Visual Studio 2008.
I have followed the instructions below. As in the instructions I start by writing this in my shell: Start/All Programs/Accessories/Command Prompt" short cut from the start menu to your desktop and then change the short cut target property to %SystemRoot%\system32\cmd.exe /K call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"

Next I write this:

cd boost_1_36_0\tools\jam\srcbuild.bat
I get some errors here:

c1 : fatal error C1083: Cannot open source file : 'yyacc.c' : No such file or directory
###
### "Could not find Yacc to build the Jam grammar."
###
### You can specify the toolset as the argument, i.e.:
### .\build.bat msvc
###
### Toolsets supported by this script are: Borland, como, gcc, gcc-nocygwin, intel-win32, metrowerks, mingw, msvc, vc7, vc8
###

fter this I write this in my shell: C:\Programs\tools\jam\src\bin.ntx86\bjam.exe --build-type=complete

But now I get an message, "could find file or directory"....

Can someone please help my with my problems above. Maybe with some instructions, cause I'm new in Quantlib, Boost and Visual Basic...

Best,

KasP
 
Use of Quantlib, Boost and Visual Studio!

Hi everyone!

Can someone help me explaining how I use Quantlib, Boost and Visual Studio? I have read David Palmers instructions, but I get some strange errors when I use that instruction. Can someone explain how to get Quantlib, Boost and Visual Studio to work? I have already downloaded and unzipped all the programs in a folder C:\Programs\.

Thanks a lot,

KasP
 
What are the errors? Did you follow the directions exactly? Which version of VS, Quantlib, Boost are you using?
 
Hi Doug!

Thanks for your answer. I have downloaded Boost_1_37_0, Quantlib 0.9.6 and Visual Studio 2008. My problem is how to get everything to work togheter..
I get these errors:

c1 : fatal error C1083: Cannot open source file : 'yyacc.c' : No such file or directory
###
### "Could not find Yacc to build the Jam grammar."
###
### You can specify the toolset as the argument, i.e.:
### .\build.bat msvc
###
### Toolsets supported by this script are: Borland, como, gcc, gcc-nocygwin, intel-win32, metrowerks, mingw, msvc, vc7, vc8
###

Could you help me???
 
You know you can download pre-built boost libraries, right?

Did you do this? Yacc is a "compiler compiler", and could definitely be in that SDK. Did you specify "msvc" in the build command to force it to use visual studio?

To build Boost you will need The Microsoft Windows SDK for VS2008 . This is available as an option when installing Visual Studio 2008.
 
Where can you download pre-build boost libraries? Do you have a link? Are they going to be installed in a same manner as not pre-build libraries?

I'm sure that I have dowloaded the SDK option. Could you write the commands for building boost using the "msvc"? Maybe I'm doing something wronge here..

KasP
 
RTFM.

I'm really not qualified to tell you the difference between the different install processes, however I doubt you'll notice the difference.
 
Back
Top