This might not even be a cling question, I'm a C++ newbie.
I am trying to play around with a library called QuantLib in the cling REPL.
I'm able to load the library in GCC by doing
#include "ql/quantlib.hpp"
and then compiling with -lQuantLib
.
In cling I've been trying permutations of the 3 lines below:
.I "ql/quantlib.hpp"
#include "ql/quantlib.hpp"
.L QuantLib
If I run the #include
first, I get a very long error, including stuff like
You are probably missing the definition of
QuantLib::AbcdAtmVolCurve::accept(QuantLib::AcyclicVisitor&) Maybe you
need to load the corresponding shared library?
But if I run
.I "ql/quantlib.hpp"
#include "ql/quantlib.hpp"
then all seems well.
.L Quantlib
results in
input_line_4:1:10: fatal error: 'QuantLib' file not found
#include "QuantLib"
regardless of when it's run.
I tried the following after kfsone's comment
.L /usr/lib/libQuantLib.so
#include "ql/quantlib.hpp"
This gives a short error!
IncrementalExecutor::executeFunction: symbol '_ZN8QuantLib5ErrorC1ERKSslS2_S2_' unresolved while linking function '__cxx_global_var_init34'!
You are probably missing the definition of QuantLib::Error::Error(std::string const&, long, std::string const&, std::string const&)
Maybe you need to load the corresponding shared library?