Hi,
it's not a linking problem, it's a constraint of the Boost test
framework. Older versions allowed different tests to have the same name,
and we had a few of those in QuantLib. Since Boost 1.67 (which came out 7
years ago), that's no longer possible and we had to change those names.
This was fixed shortly afterwards in version 1.12.1.
If you can't upgrade at least to that version of QuantLib, you have two
possibilities. You can downgrade Boost to 1.66.0 and build with that, or
you can backport the fixes in <
https://github.com/lballabio/QuantLib/pull/446> to your version of QuantLib.
Hope this helps,
Luigi
On Thu, Feb 13, 2025 at 2:50 PM Amine Ifri <ami...@gm...> wrote:
> Hi Team,
>
> Hope you are well. I am reaching out as I am using an old version of
> QuantLib built with boost 1_83_0. The library builds fine as its own
> dynamic library target, and I build the suite of tests as a separate Target
> linking to the QuantLib dylib.
>
> The tests also build fine. However, when running the suite of tests, I get
> the following error message:
>
> *Test setup error: test unit with name
> 'QuantLib__detail__quantlib_test_case(boost__bind(&BasketOptionTest__testOneDAmericanValues_
> (i _(sizeof(oneDataValues)_sizeof(oneDataValues[0])))_nTestCases_
> ((i_1)_(sizeof(oneDataValues)_sizeof(oneDataValues[0])))_nTestCases))'
> registered multiple times in the test suite 'Basket option tests'*
>
> I use the preprocessing variable BOOST_TEST_DYN_LINK to enable the
> inclusion of the main function, but I don't use the parallel runner for the
> tests.
>
> Any suggestions on how to tackle this problem will be very much
> appreciated.
>
> Thanks,
> Amine
>
> _______________________________________________
> QuantLib-dev mailing list
> Qua...@li...
> https://lists.sourceforge.net/lists/listinfo/quantlib-dev
>
|