小编Ser*_*kel的帖子

Rcpp 不编译带有 pari.h 标头的 cpp 源代码

我编写了一个 cpp 源代码,其中包含 pari.h 头文件:

#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<stdlib.h>
#include<time.h>
#include<iterator> // for ostream_iterator
#include<strings.h>
#include<string.h>
#include<sstream>
#include <pari/pari.h> // for PARI/GP library
#include<Rcpp.h> // for sourceCpp to work, this line must be uncommented

// Enable C++11 via this plugin (Rcpp 0.10.3 or later)
// [[Rcpp::plugins(cpp11)]]

using namespace std;
using namespace Rcpp; // for sourceCpp to work, this line must be uncommented

// [[Rcpp::export]]
int main() {

    long maxp = 1000000; // max value
    pari_init(500000,2); // initiate pari
    size_t …
Run Code Online (Sandbox Code Playgroud)

gcc r pari rcpp pari-gp

1
推荐指数
1
解决办法
394
查看次数

标签 统计

gcc ×1

pari ×1

pari-gp ×1

r ×1

rcpp ×1