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&)': I am compiling EquityOption.cpp as the root user on my system. Has anybody seen this type of error? What should I do? ~Ruth Oh ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
On Apr 8, 2008, at 12:06 AM, Ruth Oh wrote: > 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 [...] Hi Ruth, that should be: g++ -o EquityOption EquityOption.cpp -g -lQuantLib i.e., you have to tell the compiler to link QuantLib with the executable. Luigi ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by ruthie-oh
Thanks, Luigi, for your email. Unfortunately, that didn't work either. But I have good news. I know a friend who has used Quantlib. Apparently, all I had to do was to type make EquityOption. I felt really silly when he told me that.
|
Free forum by Nabble | Edit this page |