Hello,
I am having a installation error. I have boost1.51 version and I installed quantlib with a confiuration like: ../configure --with-boost-include=/home/abhisek/boost/boost_1_51_0/include --with-boost-lib=/home/abhisek/boost/boost_1_51_0/lib --prefix=`pwd
make Whole quantlib compiled just fine but got compilation error with examples codes. I got errors like /home/abhisek/finance/QuantLib-1.2/build/lib/libQuantLib.so: undefined reference to `boost::assertion_failed_msg(char const*, char const*, char const*, char const*, long)'
collect2: ld returned 1 exit status Somehow I messed up the configuration path somewhere. Then I wrote a simple code #include <ql/quantlib.hpp> #include <iostream>
#include <iomanip> using namespace QuantLib; int main(int argc, char *argv[]) { cout << test << endl; } Tried compiling with g++ -o test -L/home/abhisek/boost/boost_1_51_0/lib -L/home/abhisek/finance/QuantLib-1.2/build/lib -lQuantLib Got the same error. home/abhisek/finance/QuantLib-1.2/build/lib/libQuantLib.so: undefined reference to `boost::assertion_failed_msg(char const*, char const*, char const*, char const*, long)'
collect2: ld returned 1 exit status Any clue? Any help will be appreciated. Thanks.. Abhisek
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
You need the following patch which I think Luigi applied to trunk yesterday: - Boost v1.50 seems to need an assertion_failed function version which also takes a message: --- a/QuantLib/ql/errors.cpp +++ b/QuantLib/ql/errors.cpp @@ -81,6 +81,16 @@ namespace boost { // must be defined by the user + void assertion_failed_msg(char const * expr, char const * function, + char const * file, char const *mm, long line) { + throw std::runtime_error(format(file, line, function, + "Boost assertion failed: " + + std::string(expr)+ + " with message: "+ + std::string(mm))); + } + + // must be defined by the user void assertion_failed(char const * expr, char const * function, char const * file, long line) { throw std::runtime_error(format(file, line, function, -- Bojan Nikolic || http://www.bnikolic.co.uk ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
I applied it to the 1.2.x branch. We'll release a bug-fix 1.2.1 version soon.
Luigi On Tue, Sep 4, 2012 at 9:45 AM, Bojan Nikolic <[hidden email]> wrote: > > You need the following patch which I think Luigi applied to trunk > yesterday: > > - Boost v1.50 seems to need an assertion_failed function version which > also takes a message: > > --- a/QuantLib/ql/errors.cpp > +++ b/QuantLib/ql/errors.cpp > @@ -81,6 +81,16 @@ > namespace boost { > > // must be defined by the user > + void assertion_failed_msg(char const * expr, char const * function, > + char const * file, char const *mm, long line) { > + throw std::runtime_error(format(file, line, function, > + "Boost assertion failed: " + > + std::string(expr)+ > + " with message: "+ > + std::string(mm))); > + } > + > + // must be defined by the user > void assertion_failed(char const * expr, char const * function, > char const * file, long line) { > throw std::runtime_error(format(file, line, function, > > > > > > -- > Bojan Nikolic || http://www.bnikolic.co.uk > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |