TUTORIAL: Boost 1.37.0 + QuantLib 0.9.6 and Visual Studio 2008

It seems we started classes again. Doug couldn't take it anymore :D
 
Hi Kasp,

Sorry for not responding sooner. It's been a little while since I did anything quantlib related.

Regarding your messages....

First off I don't know what the problem you are running into is but I have a couple of comments that might be pertinent.

You say you downloaded boost 1.37.0 ( good so far ) but your e-mail later says that you were working in "boost_1_36_0\tools\jam\src" . My guess is that's just a typo in the e-mail but you need to make sure that the commands you type are appropriate for the code you downloaded.

Given that the boost build failed, you can't expect the quantlib build to succeed. It's crucial to successfully complete the earlier steps before trying to go on to later ones.

In your message you say that you don't have any experience with visual basic. You need to be using visual c++ - not visual basic. You might want to try uninstalling visual studio and then reinstalling - this time making sure you specify visual c++ and the SDK that goes with it.

It seems odd that you are seeing mention of yyacc.c in error messages. As far as I can tell, yyacc.c does not even come into play when you build boost in the way that you are trying to do.

These comments may or may not help you. Either way, if you follow up with more info, I might be able to shed more light on what's going on.

Hope this helps.

- 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
 
How can I get intellisense to work?

I've become somewhat dependent on it. I hate to RTFM and if I could get it to work with VS 2008, C# or C++ and quantlib my life would be a lot easier:D
 
Quantlib and C#

Thanks! I'm downloading QLNet now. I knew there had to be a reason I couldn't get it to work.
 
I'm going to do the whole thing in c++

There's really no need to use c#, it was only necessary because I was using VS 2008. MSFT removed database support for c++ in 2008 but it's there in 2005 so that's what I'll use for the project. C++ is my language of choice anyway, I don't need no stinkin memory management :smt024

As I've mentioned (I think) it's a CTD calculator to start with the possibilities of growing into a much larger system.
 
hold on a second, you are coding in C++ without memory management? Who or what is managing the memory for you?
 
Quantlib on ubuntu

Hi Everybody here,

This thread may be a wrong place for my query but i'd appreciate any advice,please. Struggling with this for the past 7 days!!!

I have installed the boost and quantlib libraries on Ubuntu.
I wrote a simple program to just include quantlib.hpp. The program ran for about 20 mins and then i killed it. I understand including the quantlib header loads all the headers in quantlib too!! I sthere a way to work this out.

Another obervation: if i just include another header not the quantlib one, theprogram runs fine!!

Would really appreciate any help , anyone can provide me.
Are there comaptibility issue between the various versions of boost and quantlib?



Regards,
Sandeep
 
VS 2008 Build error : no such file or directory

Hello Everyone,

I tried Quantlib 0.90 + Boost 1_35 and VS 2008 but when building Quantlib from Visual Studio 2008 i get errors:

c:\QuantLib-0.9.0\ql/qldefines.hpp(29) : fatal error C1083: Cannot open include file: 'boost/config.hpp': No such file or directory makecapfloor.cpp c:\QuantLib-0.9.0\ql/qldefines.hpp(29) : fatal error C1083: Cannot open include file: 'boost/config.hpp': No such file or directory lookbackoption.cpp c:\QuantLib-

I followed all processes like Dave has mentioned and didnt miss any step any idea how to go about this??

I have attached the complete log too, kindly go through it and please advise me.

Regards,
Sandeep
 

Attachments

Hi everyone,
i'm italian student and i'm writing a software in C#.net with visual studio 2008.

I have used qlnet.dll but it is not complete respect quantlib in many functions.

So i have download quantlib0.9.7 and quantlib swig 0.9.7, i have compiled vc90 and i have my dll.

In another forum i have read that i have to set environment variabile QL_DIR with the path of library..can anyone help me?
 
When i try to use the member of quantlib (example Date class) it appears this message:

The type initializer for 'QuantLib.NQuantLibcPINVOKE' threw an exception.

Thanks for help!
Mattia
 
Just installed Boost 1.39 and Quantlib 0.9.7. The installation instruction is the same as the first post on page 2, except no patch is needed.
Tested in VS2008 and everything worked.

Quantlib 0.9.7 now has several new classes: CDS, Bonds, Callable Bonds.
Now I just need to get Boost.Python to work.
 
Some errors when installing boost_1_39_0 and Quantlib 0.9.7

I followed the steps in Dave's posting. Downloaded VC++ 8.0 expression edition on WindowXP. Compiled boost_1_39_0. But I found some libraries were failed to compile. Has anyone experienced same problem? (I had some failed targets when using cygwin g++.) Final summary of compiling boost_1_39_0 follows.

ln-NT stage\lib\libboost_wave-vc90-gd.lib
"NT symlinks not supported yet, making copy"
Could Not Find C:\boost_1_39_0\stage\lib\libboost_wave-vc90-gd.lib
1 file(s) copied.
...failed updating 336 targets...
...skipped 44 targets...
...updated 4004 targets...


I then installed Quantlib_0.9.7 anyway. There were some errors. Does anyone have similar experience? Thanks.

Tests completed in 36 m 51 s
Test suite "Master Test Suite" failed with:
505 assertions out of 506 passed
1 assertion out of 506 failed
389 test cases out of 390 passed
1 test case out of 390 failed
1 test case out of 390 aborted

The failed test follows.
Testing swaption volatility matrix...
./swaptionvolatilitymatrix.cpp(214): fatal error in "QuantLib::detail::quantlib_test_case(&SwaptionVolatilityMatrixTest::testSwaptionVolMatrixCoherence)": optionDateFromTenor mismatch for floating reference date, floating market data:
option tenor: 1M
actual option date: August 19th, 2009
exp. option date: August 20th, 2009
Testing swaption volatility matrix observability...


 
Why do you want to compile the source? Just go to Boost C++ Libraries Installers for Windows - BoostPro Computing and download binary for windows. Much easier. After you install, all you have to do is add sources and libraries to appropriate search paths In VS2008. I did compile the source on RH, and did not experience any problems. Even in this case, most of the boost libraries are inlined headers, so you don't even need to compile; however, there are few (e.g. Date, Regex) that do need compilation. All this you can find in the documentation file at Boost C++ Libraries.
 
Thanks for the tips. I tried the BoostPro download. It seems to work well.

Tests completed in 37 m 27 s
Test suite "Master Test Suite" passed with:
505 assertions out of 505 passed
390 test cases out of 390 passed
Build log was saved at "file://c:\QuantLib-0.9.7\test-suite\build\vc90\Release (static runtime)\BuildLog.htm"
testsuite - 0 error(s), 0 warning(s)
 
Back
Top Bottom