Login  Register

答复: ql 1.6.1 linker error - QuantLib::Error::Error()

Posted by cheng li on Sep 07, 2015; 8:06am
URL: http://quantlib.414.s1.nabble.com/ql-1-6-1-linker-error-QuantLib-Error-Error-tp16879p16880.html

Hi Glenn,

 

Seems like linking problem. Do you have correctly link the quantlib lib to your application?

 

Regards,

Cheng

 

发件人: Glenn Williamson [mailto:[hidden email]]
发送时间: 201597 7:03
收件人: [hidden email]
主题: [Quantlib-users] ql 1.6.1 linker error - QuantLib::Error::Error()

 

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