Error Compiling EquityOption.cpp

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Error Compiling EquityOption.cpp

ruthie-oh
Hi,

I installed boost and Quantlib on a Unix vmware as the root user. Now, I'm trying to
compile EquityOption.cpp using this command line:

g++ -o EquityOption EquityOption.cpp -g

-o is for the executable EquityOption and -g is for using it with the debugger gdb. What
I then get is a long list of errors like so:

: undefined reference to `boost::assertion_failed(char const*, char const*, char const*,
long)'
/tmp/cc562xVL.o(.gnu.linkonce.t._ZN8QuantLib28LinearLeastSquaresRegressionIdEC1ERKSt6vectorIdSaIdEES6_RKS2_IN5boost9function1IddSaINS7_13function_baseEEEESaISB_EE+0x176): In function `QuantLib::LinearLeastSquaresRegression<double>::LinearLeastSquaresRegression(std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&, std::vector<boost::function1<double, double, std::allocator<boost::function_base> >, std::allocator<boost::function1<double, double, std::allocator<boost::function_base> > > >
const&)':
: undefined reference to `QuantLib::Error::Error(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, long, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
/tmp/cc562xVL.o(.gnu.linkonce.t._ZN8QuantLib28LinearLeastSquaresRegressionIdEC1ERKSt6vectorIdSaIdEES6_RKS2_IN5boost9function1IddSaINS7_13function_baseEEEESaISB_EE+0x2bf): In function `QuantLib::LinearLeastSquaresRegression<double>::LinearLeastSquaresRegression(std::vector<double, std::allocator<double> > const&, std::vector<double, std::allocator<double> > const&, std::vector<boost::function1<double, double, std::allocator<boost::function_base> >, std::allocator<boost::function1<double, double, std::allocator<boost::function_base> > > >
const&)':
blah blah...

I am compiling EquityOption.cpp as the root user on my system. Has anybody seen this type
of error? What should I do?