Pregunta

I have installed boost_1_54 on windows by checkout from svn and then

bootstrap
.\b2

QuantLib library dependent on boost compiles well all but one project: test-suite which uses BOOST_MESSAGE. this is undefined. I can see that there is no BOOST_MESSAGE in my version of boost. Therefore is this QuantLib incompatibility or have I missed something? On my linux boost version the same thing applies to BOOST_MESSAGE - it is undefined

I have seen this but I am not sure how to interpret this.

¿Fue útil?

Solución

I'm afraid you gave us more credit than we deserved :)

We haven't compiled QuantLib against Boost svn yet. The latest I've tried is Boost 1.53 (the latest released version) in which BOOST_MESSAGE was still available.

Thanks for the heads-up, though. I'll patch the library so that it's ready for next version. As mentioned in the comments, it should be as simple as adding

#if BOOST_VERSION > 105300
#define BOOST_MESSAGE(msg) BOOST_TEST_MESSAGE(msg)
#endif

to test-suite/utilities.hpp.

Otros consejos

on linux I had to add

libboost_unit_test_framework.so

to the Linker->Libraries and

#include <boost/test/unit_test.hpp>

#define BOOST_MESSAGE( M )                  BOOST_TEST_MESSAGE( M )

is already present in test/test_tools.hpp. on windows I have different #defines and this is not present, so I added it to the

unit_test_log.hpp

where BOOST_TEST_MESSAGE is defined (in boost files to avoid same issue again in the case of other applications using BOOST_MESSAGE). BOOST_MESSAGE issue resolved but still can't disambiguate

const void* = boost::test_tools::check_is_close

and

const void* = boost::test_tools::check_is_small

because these are templates. so the solution is to remove it (test-suite compiles well) or use appropriate pointers to function templates

on Windows, after romoval or function

_use_check

in utilities.hpp

changed to not have pointers to TEMPLATE functions as default, so changed to:

void _use_check(
                        const void*,
                        const void*) const {}

there were still errors while building test-suite project. unresolved externals: fdmhestonfwdop, fdmblackscholesfwdop, fdmsquarerootfwdop. obviously this classes (headers+source) I had to add to Quantlib project, build library QuantLib-vc110-mt-gd.lib again and rebuild test-suite project then. after pleasure with VS linker error "lnk1210 exceeded internal ilk size limit link with incremental no" (it really likes RAM, but on windows I have this resource quite limited), it is OK. compiled. : p

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top