我正在尝试使用 xeus-cling 和 mybinder 创建一个 C++ Jupyter Notebook。我想包括图书馆犰狳,我可以在 Jupyter Notebook 中本地执行此操作,如下所示:
#pragma cling add_library_path("armadillo-10.7.5")
#pragma cling add_include_path("armadillo-10.7.5/include/")
#pragma cling load("armadillo")
#include <armadillo>
using namespace std;
using namespace arma;
mat A(4, 5, fill::randu);
mat B(4, 5, fill::randu);
cout << A*B.t() << endl;
文件结构在此 Github 存储库中的位置(您还可以在 README 中找到活页夹链接):https ://github.com/AntonioDaSilva/xeus-cling
但是,犰狳需要 OpenBLAS 和 LAPACK 库,因为我没有管理员权限,所以我无法在 mybinder 上安装它们。我相信这就是我在活页夹中运行上面的代码时收到以下错误的原因:
cling::DynamicLibraryManager::loadLibrary(): libblas.so.3: cannot open shared object file: No such file or directory
IncrementalExecutor::executeFunction: symbol 'dgemv_' unresolved while linking function '_GLOBAL__sub_I_cling_module_6'!
IncrementalExecutor::executeFunction: symbol 'dsyrk_' unresolved while linking function '_GLOBAL__sub_I_cling_module_6'!
IncrementalExecutor::executeFunction: symbol 'ddot_' unresolved while linking function '_GLOBAL__sub_I_cling_module_6'!
IncrementalExecutor::executeFunction: symbol 'dgemm_' unresolved while linking function '_GLOBAL__sub_I_cling_module_6'!
你能帮我弄清楚如何在活页夹中手动包含这些库吗?