Frequently asked questions
Generic questions- Is it OK to email a QuantLib developer?
- How should I report a bug?
- How can I give back to this project?
- I'm having trouble building QuantLib with MinGW.
- I get an error when trying to compile QuantLib in the Dev-C++ IDE.
- I get a compile error about a missing boost header.
- I encounter a linking error about a boost library.
- I encounter a number of compile errors when building the test-suite.
- I'm having trouble building QuantLib with the Sun Studio 11 compiler.
QuantLib cross-platform support/extensions
Generic questions
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. The second 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.
However, if your intent in writing was to call the developer names, disregard the above. By all means write personally to the developer. And possibly, add the line:
X-Bogosity: Yes
You can file a bug report using the SourceForge interface at <http://sourceforge.net/tracker/?group_id=12740&atid=112740>, 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:
- OS system
- compiler (version number, patch level, etc.)
- Boost version
- the compilation error and the file affected
If the test suite fails please report the output obtained by executing the test suite with the following command line options:
--log_level=messages --build_info=yes --result_code=no --report_level=short
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 section 'Contributing to the project' 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 at <http://www.amazon.co.uk/exec/obidos/registry/2PC411P4U28CG/ref=wl_em_to>, and Nando's is at <http://www.amazon.co.uk/exec/obidos/registry/Q94W7HUR49Z5/ref=wl_em_to>.)
Amazon Wish List? Aren't you ashamed of yourselves?
< broad grin > No, we aren't.
Contributing to the project
I'm interested in getting involved with the project. What should I do?Contact the QuantLib group by posting to the developers' mailing list (<quantlib-dev@lists.sourceforge.net>) and describe your experience and interests. Before doing this, please read:
- the generic introduction for new developers <http://quantlib.org/newdeveloper.shtml>
- the project overview <http://quantlib.org/reference/overview.html>, with its to-do suggestions
- the Developer FAQ <http://quantlib.org/developerFAQ.shtml>
- The Programming Style Guidelines <http://quantlib.org/style.shtml>
- the detailed low-level to-do list <http://quantlib.org/reference/todo.html>
Also, you might want to specify an area of the library you are particularly interested to, or which would be most useful to you. Asking the administrators to choose a task for you is ok, but it might take time to get an answer and it increases the odds that the chosen task will bore you or otherwise discourage you from completing it.
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 at <http://sourceforge.net/tracker/?group_id=12740&atid=312740>. 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 CVS 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.
Building QuantLib
I'm having trouble building QuantLib with MinGW.Terry August was kind enough to put together detailed instructions for MinGW users. They can be found at <http://www.stanford.edu/~taugust/quantlib.html>.
When trying to compile QuantLib in the Dev-C++ IDE, I get an error saying that "Could not create makefile: C:\...\Makefile.win"
The message is misleading. Close the IDE, create an empty sub-directory named "build" in the same directory as the Dev-C++ project, and retry.
Also, a user reported that this was necessary but not sufficient. His workaround was to change the relative paths in Project Options / Build Options to absolute paths (e.g., ".\lib" to "C:\QuantLib-0.3.11\lib").
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.
At the time of this writing, it is somewhat difficult to modify the include path of the latest Visual C++ Express Beta. Instructions to perform such operation are available at <http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=2995>.
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.
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 http://www.boost.org/more/getting_started.html for instructions.
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.
When building the test-suite, I encounter a number of compile errors. I'm using gcc and Boost 1.32.
This is a Boost problem; you have to apply a one-line patch to your Boost installation. Open boost/test/detail/wrap_stringstream.hpp and edit line 120,
#if !defined(BOOST_NO_STD_LOCALE) && BOOST_WORKAROUND(BOOST_MSVC, >= 1310)
#if !defined(BOOST_NO_STD_LOCALE) && ( !defined(BOOST_MSVC) || BOOST_WORKAROUND(BOOST_MSVC, >= 1310))
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 1
Testing QuantLib
The QuantLib test-suite fails when compiling under Mac OS X.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
Using QuantLib
When linking QuantLib to my project under Visual C++, I encounter the following 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 Project Settings | Link | Input in VC6 or Property Pages | Linker | Input in VC7) or you haven't really built QuantLib-vcX-xx-xxx-a_b_c.lib yet. Note that each build configuration produces a different library.
Programs linking QuantLib fail to run correctly under Mac OS X.
This is the same problem reported in the 'Testing QuantLib' section; the same workaround applies.
QuantLib features
Why is feature X missing from QuantLib? It would be a very useful one.See the section 'Contributing to the project' above.
QuantLib features
I'm having trouble building/using QuantLibAddin.The QuantLibAddin project has its own troubleshooting page; see <http://quantlib.org/quantlibaddin/troubleshooting.html>.
QuantLib mailing lists
How do I prevent my auto-responder from posting to the list while I'm away?It might be possible to configure the auto-responder so that it ignores posts to the mailing list. However, this depends on the particular software you are using.
If that is not possible, you can temporarily prevent the list from posting to your account. It is a bit more of a hassle, but the other list members will appreciate.
Go to your mailing-list configuration page (its direct address is sent to you monthly by SourceForge; alternatively, go to <http://lists.sourceforge.net/lists/listinfo/quantlib-users> and insert your mail address in the last form in the page.)
From there you can enable the "Disable mail delivery" option, causing the posts to the list not to be forwarded to your account.
The mail delivery can be re-enabled later in the same way; you'll have to check the list archives at <http://sourceforge.net/mailarchive/forum.php?forum=quantlib-users> to catch up on the posts you missed.
QuantLib cross-platform support/extensions
Does QuantLib support .NET?C# has never been officially supported by the QuantLib team. Both <http://www.quantlib.net> and <http://www.capetools.net> have been "external" attempts which now look like abandoned projects. As such nobody but their authors could help you.
What's the difference between QuantLibXL and QuantLibAddin?
Feature | QuantLibXL | QuantLibAddin |
Design | Procedural and stateless. Each function returns a value, no state persists within the library | Object oriented and stateful. Calling a function instantiates an object in the repository - objects may be interrogated, updated, or passed as inputs to constructors/member functions of other objects. |
Lifecycle | Stable, discontinued. Last updated for QuantLib 0.3.8 | Prototype which at the time of this writing is under active development |
Platforms | Microsoft Excel | Microsoft Excel, OpenOffice.org Calc (Windows and Linux), Guile, C/C++ |