这可能不是一个棘手的问题,我是一个C ++新手。
我正试图在附着REPL中使用名为QuantLib的库。
我可以通过
在GCC中加载库#include "ql/quantlib.hpp"
然后使用-lQuantLib
进行编译。
我坚持尝试下面3行的排列:
.I "ql/quantlib.hpp"
#include "ql/quantlib.hpp"
.L QuantLib
如果我先运行#include
,我会收到很长的错误,包括
You are probably missing the definition of
QuantLib::AbcdAtmVolCurve::accept(QuantLib::AcyclicVisitor&) Maybe you
need to load the corresponding shared library?
但如果我跑
.I "ql/quantlib.hpp"
#include "ql/quantlib.hpp"
然后一切似乎都很好。
.L Quantlib
会产生
input_line_4:1:10: fatal error: 'QuantLib' file not found
#include "QuantLib"
无论何时运行。
我在kfsone的评论
之后尝试了以下内容.L /usr/lib/libQuantLib.so
#include "ql/quantlib.hpp"
这会给出一个简短的错误!
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?