- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
这甚至可能不是一个固定问题,我是 C++ 新手。
我正在尝试在 cling 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?
最佳答案
Cling 需要知道您要使用的结构/函数的语法以及执行的二进制代码。
对于语法你必须添加包含,例如像这样:
#include "myfile.hpp"
对于二进制代码,你必须像这样加载库:
#pragma cling load("myfile.so.9.220.0")
关于c++ - 你如何用cling加载一个库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37671030/
使用方法 Cling在我的应用程序中通过 API 来解释 C++ 代码? 我希望它提供类似终端的交互方式,而无需编译/运行可执行文件。假设我有 hello world 程序: void main()
当我尝试运行 ngserve我收到此错误: The "@angular/compiler-cli" package was not properly installed. Error: TypeErr
我使用 Cling 创建了应用程序并且工作正常但是当我创建发布版本时我收到以下消息并且渲染器没有播放任何内容: 11-22 16:24:53.341 20172-20172/? I/Rende
我正在尝试构建一个 Android 应用程序,它在内部使用 Cling 库。我能够运行应用程序,但是我观察到每次调用搜索功能时都不会发送 M-Search 数据包,如下所示。 m_up
我已经安装了用于在 Jupiter notebook 中使用 C++ 的 cling 内核 但是在实现代码之后 #include using namespace std; int main() {
我正在尝试使用 Visual Studio 为 Windows 构建 Cling。如下所示完成所有步骤后,不知为何我在目录/cling/build/Debug/bin 中似乎没有cling.exe。有
当我安装 Cling 时出现此错误- "文件"/home/satoukazuma/anaconda2/lib/python2.7/subprocess.py",第 1025 行,在 _execute_
我正在使用很棒的 Cling 库来扫描我的网络以查找 UPnP 设备。我的目标是拼凑一个小的 DLNA 库浏览器,这样我就可以学习这项技术。到目前为止,我已经能够 1. 扫描网络并连接 UPnP 设备
对于一个学校项目,我和我的团队正在开展一个项目,在该项目中我们需要使用 cling interpreter .我们观看了几个关于 cling 的 youtube 视频,所有视频都已编译并在我们的系统上
为什么安装 Xeus-cling 需要 Anaconda 包管理器?到目前为止,我只使用过 pip,切换到新的包管理器似乎需要做很多工作。我想开始将 C++ 与 Jupyter 结合使用,但所有安装说
我按照 https://github.com/root-mirror/cling#jupyter 上给出的说明在我的笔记本电脑上使用 Ubuntu 15.04 构建了 Cling因为我想为 Jupyt
我正在运行 Pop!_OS(ubuntu 衍生版本)并从默认存储库 apt 安装了 boost (libboost-all-dev)。我知道它已经正确安装,因为我可以使用 GCC 编译并运行简单的 b
我正在尝试在 Windows 10 上使用 xeus-cling C++ 内核激活 Jupiter我做了以下事情: 安装了全新的 Miniconda 创建了一个新环境 已安装 Jupyter(unis
我新安装了 Anaconda (v.4.3.1) 并使用 conda 命令在 Jupyter 上为 C++ 内核安装了 cling。我使用了 conda install -c conda-forge
我在使用 Upnp 将视频文件发送到带有 java/android 的 xbox 时遇到了问题。 我使用 cling api通过网络发现和连接 upnp 设备。发现操作运行良好,检测到 xbox。问题
我是一名优秀的程序员,十分优秀!