c++ - 在 Windows 上使用带有 Cxx.jl 的 Julia 中的 boost 库
问题描述
我在 Julia 1.3.1 中使用 Cxx 来使用 boost 库的功能,安装此类库后它在 Linux 上正常工作,但在 Windows 中我从未让它工作。这是我写的模块:
module Airyzero
#Returns zeros of Airy's function
using Cxx;
export airyzero
cxx"""
#include<iostream>
#include <boost/math/special_functions/airy.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
typedef boost::multiprecision::cpp_dec_float_50 float_type;
"""
cxx"""
double airyzero1(int y) {
return boost::math::airy_ai_zero<double>(y);
}
"""
airyzero(ind) = @cxx airyzero1(ind)
end
所以我可以在我的代码中使用airy_ai_zero
boost中的函数。airyzero
我需要它也可以在 Windows 中工作,因为我实验室的计算机都没有使用 Linux(我的同事也没有)。
解决方案
我在头目录中添加了安装 boost 的路径:
if Sys.iswindows()
const pathboost = "C:\\boost_1_73_0";
addHeaderDir(pathboost,kind=C_System);
end
推荐阅读
- java - Java CompletionService 如何管理多个任务提交?
- android - 如何不时从 Firebase 实时数据库接收数据
- python - 如何在 cifar-10 中选择特定的类
- powershell - 有没有办法用按钮在 Powershell 中发送电子邮件?
- javascript - 错误,同时将元素从 mongodb 推送到数组
- android - 如何使用 Android studio 编译一个 apex(Android Pony EXpress)?
- python-3.x - 为什么 argparse.py 总是先运行?
- reactjs - 在基于承诺的模式中访问上下文 (React)
- javascript - A帧动画缩小半径
- java - 如何通过 Flink 流转换非 json