Hi, I am trying to get QL working on Debian, but failing at the last step. I have downloaded the source, built and installed the library (“make”, “make install”) without any errors, but my application that uses the QuantLib library throws up
some linker errors related to a single class (QuantLib::Error): build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::Observable::notifyObservers()': /usr/local/include/ql/patterns/observable.hpp:143: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::operator+(QuantLib::Array const&, QuantLib::Array const&)': /usr/local/include/ql/math/array.hpp:499: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::DiscretizedOption::reset(unsigned long)': /usr/local/include/ql/discretizedasset.hpp:222: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::Instrument::setupArguments(QuantLib::PricingEngine::arguments*) const': /usr/local/include/ql/instrument.hpp:145: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::Instrument::performCalculations() const': /usr/local/include/ql/instrument.hpp:164: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' build/Debug/GNU-Linux-x86/PricingEngine.o:/usr/local/include/ql/instrument.hpp:176: more undefined references to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' follow I’m on Debian 8, amd64, compiled both the library and application with g++-5. Does anyone have any ideas? Glenn Williamson | Phone: +61 (0)411 843 829 | Email:
[hidden email] ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi Glenn, Seems like linking problem. Do you have correctly link the quantlib lib to your application? Regards, Cheng 发件人: Glenn Williamson [mailto:[hidden email]] Hi, I am trying to get QL working on Debian, but failing at the last step. I have downloaded the source, built and installed the library (“make”, “make install”) without any errors, but my application that uses the QuantLib library throws up some linker errors related to a single class (QuantLib::Error): build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::Observable::notifyObservers()': /usr/local/include/ql/patterns/observable.hpp:143: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::operator+(QuantLib::Array const&, QuantLib::Array const&)': /usr/local/include/ql/math/array.hpp:499: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::DiscretizedOption::reset(unsigned long)': /usr/local/include/ql/discretizedasset.hpp:222: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::Instrument::setupArguments(QuantLib::PricingEngine::arguments*) const': /usr/local/include/ql/instrument.hpp:145: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' build/Debug/GNU-Linux-x86/PricingEngine.o: In function `QuantLib::Instrument::performCalculations() const': /usr/local/include/ql/instrument.hpp:164: undefined reference to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' build/Debug/GNU-Linux-x86/PricingEngine.o:/usr/local/include/ql/instrument.hpp:176: more undefined references to `QuantLib::Error::Error(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' follow I’m on Debian 8, amd64, compiled both the library and application with g++-5. Does anyone have any ideas? Glenn Williamson | Phone: +61 (0)411 843 829 | Email: [hidden email] ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
>Seems like linking problem. Do you have correctly link the quantlib lib to your application? Yes, it’s certainly a linking problem – and yes, I have “ … -lQuantLib …” on my linker command line. If the linker could not find QuantLib, then it would give many, many, many more errors than just those four
J I’ve been looking into it further today, and while I haven’t actually figured it out, I’m thinking that it’s related to me using gcc5 from Debian’s “unstable” branch, apparently there are some big changes between
gcc4.9 and gcc5. Glenn Williamson | Phone: +61 (0)411 843 829 | Email:
[hidden email] ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
I am using gcc 5.1.0, yet on Ubuntu 14.04.1, where it is working just fine.
Peter On 7 September 2015 at 10:43, Glenn Williamson <[hidden email]> wrote: >>Seems like linking problem. Do you have correctly link the quantlib lib to >> your application? > > > > Yes, it’s certainly a linking problem – and yes, I have “ … -lQuantLib …” on > my linker command line. If the linker could not find QuantLib, then it would > give many, many, many more errors than just those four J > > > > I’ve been looking into it further today, and while I haven’t actually > figured it out, I’m thinking that it’s related to me using gcc5 from > Debian’s “unstable” branch, apparently there are some big changes between > gcc4.9 and gcc5. > > > > > > Glenn Williamson | Phone: +61 (0)411 843 829 | Email: [hidden email] > > > ------------------------------------------------------------------------------ > > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users > ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Rings a bell to some problems I have encountered; still I might be off track but give it a try:
It could be gcc5 is compiling c11 stl now by the look of those error messages. Can you recomp telling gcc to go back to the old days? Best Pepe ----- Original Message ----- > I am using gcc 5.1.0, yet on Ubuntu 14.04.1, where it is working just > fine. > Peter > > On 7 September 2015 at 10:43, Glenn Williamson <[hidden email]> > wrote: > >>Seems like linking problem. Do you have correctly link the quantlib > >>lib to > >> your application? > > > > > > > > Yes, it’s certainly a linking problem – and yes, I have “ … > > -lQuantLib …” on > > my linker command line. If the linker could not find QuantLib, then > > it would > > give many, many, many more errors than just those four J > > > > > > > > I’ve been looking into it further today, and while I haven’t > > actually > > figured it out, I’m thinking that it’s related to me using gcc5 > > from > > Debian’s “unstable” branch, apparently there are some big changes > > between > > gcc4.9 and gcc5. > > > > > > > > > > > > Glenn Williamson | Phone: +61 (0)411 843 829 | Email: > > [hidden email] > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > > QuantLib-users mailing list > > [hidden email] > > https://lists.sourceforge.net/lists/listinfo/quantlib-users > > > > ------------------------------------------------------------------------------ > _______________________________________________ > QuantLib-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/quantlib-users > ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
hmm, normally I have -std=c++11 enabled, no problems (except these
auto_ptr warnings, which I worked around, but which are not harmful in any case); still worth a try maybe On 7 September 2015 at 16:29, <[hidden email]> wrote: > Rings a bell to some problems I have encountered; still I might be off track but give it a try: > It could be gcc5 is compiling c11 stl now by the look of those error messages. Can you recomp telling gcc to go back to the old days? > Best > Pepe > > > ----- Original Message ----- >> I am using gcc 5.1.0, yet on Ubuntu 14.04.1, where it is working just >> fine. >> Peter >> >> On 7 September 2015 at 10:43, Glenn Williamson <[hidden email]> >> wrote: >> >>Seems like linking problem. Do you have correctly link the quantlib >> >>lib to >> >> your application? >> > >> > >> > >> > Yes, it’s certainly a linking problem – and yes, I have “ … >> > -lQuantLib …” on >> > my linker command line. If the linker could not find QuantLib, then >> > it would >> > give many, many, many more errors than just those four J >> > >> > >> > >> > I’ve been looking into it further today, and while I haven’t >> > actually >> > figured it out, I’m thinking that it’s related to me using gcc5 >> > from >> > Debian’s “unstable” branch, apparently there are some big changes >> > between >> > gcc4.9 and gcc5. >> > >> > >> > >> > >> > >> > Glenn Williamson | Phone: +61 (0)411 843 829 | Email: >> > [hidden email] >> > >> > >> > ------------------------------------------------------------------------------ >> > >> > _______________________________________________ >> > QuantLib-users mailing list >> > [hidden email] >> > https://lists.sourceforge.net/lists/listinfo/quantlib-users >> > >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> QuantLib-users mailing list >> [hidden email] >> https://lists.sourceforge.net/lists/listinfo/quantlib-users >> ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
I fired up a Debian unstable virtual machine from a Docker image, and I could compile and link a test program correctly. I'm guessing the guy who answered you on StackOverflow (http://stackoverflow.com/questions/32429149/quantlib-linker-error-quantliberrorerror) might have got it right. Luigi On Mon, Sep 7, 2015 at 5:09 PM Peter Caspers <[hidden email]> wrote: hmm, normally I have -std=c++11 enabled, no problems (except these -- <http://leanpub.com/implementingquantlib/> ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Glenn Williamson | Phone: +61 (0)411 843 829 | Email:
[hidden email] From: Luigi Ballabio [mailto:[hidden email]]
I fired up a Debian unstable virtual machine from a Docker image, and I could compile and link a test program correctly. I'm guessing the guy who answered you on StackOverflow (http://stackoverflow.com/questions/32429149/quantlib-linker-error-quantliberrorerror)
might have got it right. Luigi On Mon, Sep 7, 2015 at 5:09 PM Peter Caspers <[hidden email]> wrote:
-- ------------------------------------------------------------------------------ _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Free forum by Nabble | Edit this page |