Re: Welcome and status

Dirk Eddelbuettel

My bad on the bad instruction.  On linux one step works, and I also should have added the compile time flags `g++` prefers to not yell too much about Boost options...


Re: Welcome and status


Thanks, Dirk, for putting us all together.

However, the build code for the C++ file doesn't work for me. It takes a long time to run (5 to 10 minutes?) ending up with huge amounts of errors like (I've attached the log file)

C:\Users\amc038\AppData\Local\Temp\ccA9zPn3.o:windows_bug_redone.cpp:(.text+0x7c): undefined reference to `QuantLib::Date::Date(int, QuantLib::Month, int)'

I have no idea why a intermediate step is necessary but the below code works.

c:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"quantlib-1.14/include" -c windows_bug_redone.cpp -o windows_bug_redone2.o
c:/Rtools/mingw_64/bin/g++ -static -o windows_bug_redone2 windows_bug_redone2.o -L"quantlib-1.14/lib/x64" -l:libQuantLib.a


Welcome and status

Dirk Eddelbuettel


Thanks for accepting the invitation to congregate here. It may make it
easier for lurkers to observe than if we continued with private email --
which is also difficult once multiple conversations happen.

We all need one initial message "approved" before unfiltered posting can
happen. So allow for a little delay on your first post.

I posted the R and C++ file we used as starting points in the files section
of this group, see

I am also open to going to git{hub,lab} or another site but so far the scope
may be limited enough as we "just" try to squash this bug.

So to summarize, I think we all are in agreement that

- the R file works on platforms other than Windows, but leads to segfault on

- the C++ file replicates this, without involving R, so this may be a
QuantLib issue, likely tied to the (for upstream Quantlib) somewhat
non-standard build

- it could be the std::shared_ptr vs boost::shared_ptr issue but I am not
convinced it is as this works "elsewhere"

- so we have to dig in QuantLib, via gdb (on Windows? does it exists for
MSys?) or via old-fashioned boat loads of printf()

- Josh is trying to see if the Boost unit_test library can be built so that
we can try the library build

- the library, for anyone new here, is at

- the C++ file can be built (taken from my reply to Shrektan with one
correction, untested, paths need adjustments dependning on how you

c:/Rtools/mingw_64/bin/g++ -static -std=gnu++11 -I"quantlib-1.14/include" \
-L"quantlib-1.14/lib/x64" -l:libQuantLib.a windows_bug_redone.cpp \
-o windows_bug_redone

and the resulting windows_bug_redone should then go belly-up at the end
when the discountcurve hits the bondcalc constructor.

That's it so far. Pipe in with anything I forgot or needs correcting.

Thanks again for coming here. I think we can squash this damn bug (or nest of


-- | @eddelbuettel |

81 - 83 of 83