Frequently-Asked Questions
FAQ Revised: Friday 09 May 2008 15:49:05
Table of Contents
- 1. General questions
- 2. Contributing to the project
- 3. Building QuantLib
- 3.1. I'm having trouble building Boost.
- 3.2. I'm having trouble building QuantLib with MinGW.
- 3.3. When building QuantLib, I get a compile error about a missing boost/something header.
- 3.4. When building the test-suite, I encounter a linking error about libboost_unit_test_framework-xxx.
- 3.5. But I have no such library on my machine!
- 3.6. Ok, now I have the library; and the library path is set correctly. But I still cannot link!
- 3.7. I'm having trouble building QuantLib with the Sun Studio 11 compiler.
- 3.8. I'm having trouble building QuantLib with the Visual C++ 7.1 compiler (a.k.a Visual C++ .NET.)
- 4. Testing QuantLib
- 5. Using QuantLib
- 6. QuantLib features
- 7. QuantLib extensions
- 8. QuantLib mailing lists
1. General questions
- 1.1. Is it OK to email a QuantLib developer to ask questions, or seek help, or report a bug?
- Yes, it is. However, we urge you to consider posting to the
QuantLib mailing list instead. This is for two reasons. The first
is that messages on the list are stored: the next one with your
problem will be able to find the answer by searching the archives.
Moreover, the developers can volunteer only a limited time; if they
have to choose what to answer to, they will privilege the posts
that will benefit more people. The second reason is that you might
get your answer sooner. For instance, it just so happens that I am
writing this entry in the middle of a two-weeks period without an
Internet connection. If anybody wrote me last Monday, the poor
soul will wait two weeks for an answer which could have been given
already by someone else on the list.
- 1.2. How should I report a bug?
- You can file a bug report using the
SourceForge interface, or you could write to a QuantLib mailing
list.
In any case please report as much details as possible.
If it is a compilation problem please state at least:
- operating system;
- compiler (version number, patch level, etc.);
- Boost version;
- the compilation error and the file affected;
--log_level=messages --build_info=yes --result_code=no --report_level=short
- 1.3. Thanks for this project. How can I give back to it?
- In true open-source fashion, you can contribute code to the
project; see the 'Contributing to the project' section below. This
is by far the preferred contribution, closely followed by using the
library intensively and reporting any bugs you might find---and
possibly patches for fixing them.
However, if you made money by using QuantLib and feel that, as Christmas is getting near, you want to give us a token of your gratitude---well, who am I to discourage you? (for instance, < grin > Luigi's wish list on Amazon UK is here, and Nando's is here.) - 1.4. Amazon Wish List? Aren't you ashamed of yourselves?
- < broad grin > No, we aren't.
2. Contributing to the project
- 2.1. I'm interested in getting involved with the project. What should I do?
- There are many ways in which you can help the project. You can
read our developer
introduction for more information.
- 2.2. How do I contribute code to the project?
- First of all, make sure that contributing code on your part cannot
result in litigation about intellectual property. If you work at
some financial institution, ask for permission before contributing
any relevant portion of code---and get a statement in print.
As for the mechanics of contribution, the preferred way is to submit a patch to the SourceForge patch tracker. This will make it less likely that your files are forgotten in the depths of a developer's mailbox.
The preferred format is a diff file as created by the 'patch' utility. If possible, send differences against the current (HEAD) code base available in the SVN repository; diff files based on the latest release might not apply to the latest sources.
If 'patch' is not available on your system or you are not familiar with it, submit the modified files. However, keep in mind that integrating such a contribution will require more work and therefore will take longer.
Finally, contributions should be accompanied by one or more test cases checking the functionality of the new code. While this is not a strict requirement, complying with it will buy from the developers a lot more sympathy towards your contribution.
3. Building QuantLib
- 3.1. I'm having trouble building Boost.
- If you're using Visual C++ 7.1 or 8.0, you don't need to build
Boost: an installer for precompiled binaries is available here
(note, though, that at this time it won't work through a proxy
server.)
If you're using another compiler (or you are, alas, behind a proxy server) you can ask for help on the QuantLib mailing list. However, you'll probably get better help from the Boost mailing list since the Boost people have much better expertise in troubleshooting their libraries than we have. - 3.2. I'm having trouble building QuantLib with MinGW.
- Terry August was kind enough to put together detailed instructions
for MinGW users. Although a bit outdated, they can be found here.
- 3.3. When building QuantLib, I get a compile error about a missing boost/something header.
- As mentioned in the readme, QuantLib depends on the Boost library
(http://www.boost.org). You must
download and install it before building QuantLib. After
installation, you might have to setup your IDE so that the Boost
headers are in its include path.
- 3.4. When building the test-suite, I encounter a linking error about libboost_unit_test_framework-xxx.
- The folder including the Boost libraries in not in your link path.
See the documentation of your compiler for instructions on how to
add it.
- 3.5. But I have no such library on my machine!
- Most likely, you downloaded the Boost distribution and just copied
its header files somewhere in your include path. The Boost
libraries must be built as well; see here for
instructions.
- 3.6. Ok, now I have the library; and the library path is set correctly. But I still cannot link!
- You're using Dev-C++ or MinGW, aren't you? gcc is looking for a
library called libboost_unit_test_framework-xxx.a, but the Boost
installation process created a libboost_unit_test_framework-xxx.lib
instead. Make a copy of the latter in the same location and rename
the copy so that it has the correct extension.
- 3.7. I'm having trouble building QuantLib with the Sun Studio 11 compiler.
- If the error you're getting resembles to
>> Assertion: (../lnk/init.cc, line 1032) while processing ../../ql/history.hpp at line 135. *** Error code 1you need to patch your compiler. Sun makes the needed patches available here; you need the ones labeled as "Compilers back-end" and "C++". - 3.8. I'm having trouble building QuantLib with the Visual C++ 7.1 compiler (a.k.a Visual C++ .NET.)
- If such error is
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\vector(1112) : error C2065: '_Myoff' : undeclared identifier
it is caused by the latest VC++7.1 implementation of std::vector<bool>, which compiles fine when Microsoft extensions are enabled, but fails to compile in ANSI-compliance mode (used when building QuantLib.)
In order to fix it, you'll have to edit line 1112 of vector (and possibly other lines in the method being defined) and replace all occurrences of "_Myoff" with "this->_Myoff" (without quotes, of course.)
4. Testing QuantLib
- 4.1. The QuantLib test-suite fails when compiling under Mac OS X 10.3.
- We are aware of the problem; apparently, there are issues with
global and/or static variables when using shared libraries. As a
workaround, compile QuantLib as a static library. This can be
accomplished by running configure as:
configure --disable-shared
5. Using QuantLib
- 5.1. I cannot link QuantLib to my project under Visual C++
- If you're encountering the linking error
LINK : fatal error LNK1104: cannot open file "QuantLib-vcX-xx-xxx-a_b_c.lib"
the folder including QuantLib-vcX-xx-xxx-a_b_c.lib is not in your link path (See the menu Property Pages | Linker | Input) or you haven't really built QuantLib-vcX-xx-xxx-a_b_c.lib yet. Note that each build configuration produces a different library. - 5.2. Programs linking QuantLib fail to run correctly under Mac OS X 10.3.
- We are aware of the problem; apparently, there are issues with
global and/or static variables when using shared libraries. As a
workaround, compile QuantLib as a static library. This can be
accomplished by running configure as:
configure --disable-shared
6. QuantLib features
- 6.1. Why is feature X missing from QuantLib? It would be a very useful one.
- See the 'Contributing to the project' section in this FAQ.
7. QuantLib extensions
- 7.1. I'm having trouble building/using QuantLibXL or QuantLibAddin.
- The QuantLibAddin project has its own FAQ; see http://www.quantlibaddin.org/faq.html.
- 7.2. Does QuantLib support .NET?
- Not directly. C# bindings for QuantLib are available, though; see
the extensions page.
- 7.3. Does QuantLib support FpML? Serialization?
- Not yet. The subject has been discussed in the mailing lists (look
in the archives for the relevant threads) but no actual work has
been done and help is needed in this area. The first step would be
to formalize and document the proposed design, perhaps as a QuEP.
8. QuantLib mailing lists
- 8.1. How do I start a new topic?
- Use the "New message" command on your mail client; do not reply to
another post and change the subject. Although seemingly more
convenient for you, replying will cause your message to appear in
the wrong thread in the mailing list archive, in the newsgroup
interface at Gmane, and in mail clients that support threads. This
brings a whole lot of inconvenience on a number of
people---possibly including you, as your message might be
overlooked by people not interested in the original topic.
