简体   繁体   English

如何构建外部 C++ 库以与 R/Rcpp 一起使用(例如 Boost)

[英]How to build an external C++ library to use with R/Rcpp (e.g. Boost)

I can't seem to find anything on the internet which show you how to build and compile a C++ library such that it can be used in R via the Rcpp package.我似乎在互联网上找不到任何东西,它向您展示如何构建和编译 C++ 库,以便它可以通过 Rcpp ZEFE90A8E604A7C840E88D03A67F6B7 在 R 中使用。 I am missing some steps where the library is somehow linked to R tools我错过了一些步骤,其中库以某种方式链接到 R 工具

For instance how do you get the boost library working with R or any other such library?例如,如何让 boost 库与 R 或任何其他此类库一起使用?

Normal instructions:正常指令:

https://andres.jaimes.net/718/how-to-install-the-c-boost-libraries-on-windows/ https://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html#or-build-from-the-command-prompt https://andres.jaimes.net/718/how-to-install-the-c-boost-libraries-on-windows/ https://www.boost.org/doc/libs/1_55_0/more/getting_started/ windows.html#or-build-from-the-command-prompt

This is almost surely a duplicate but I am in-between tasks and cannot search now...这几乎肯定是重复的,但我处于任务之间,现在无法搜索......

"It's still complicated" but Rcpp 1.0.5 now also ship this arXiv paper I wrote on this as this vignette . “它仍然很复杂”,但 Rcpp 1.0.5 现在还发布了我在此上写的这篇 arXiv 论文,作为这个小插图 In short, you need to differentiate between简而言之,您需要区分

  • header-only you can ship or include仅标题,您可以发送或包含
  • small-ish library you include and build您包含并构建的小型库
  • an external library外部库

The third one is hardest as you now have the problem of getting it to CRAN and your users.第三个是最难的,因为您现在遇到了将其发送给 CRAN 和您的用户的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在C ++中使用Rcpp的Boost库 - How to use Boost library in C++ with Rcpp 在转换到C ++ 11期间管理外部库(例如boost) - Managing external libraries (e.g. boost) during transition to C++11 当使用 SAST 工具时,为什么我们必须为编译语言(例如 C/C++)使用“构建包装器”? - When using a SAST tool, why do we have to use a "build wrapper" for compiled languages (e.g. C/C++)? 使用外部C库在Rcpp中编译C ++ - Compiling C++ in Rcpp with external C library 如何使用智能指针(例如auto_ptr r shared_ptr)在Linux上用C ++生成链接列表数据结构? - How to use smart pointer (e.g. auto_ptr r shared_ptr) to generate a link list data structure in C++ on Linux? 如何从boost库中取出单个元素(例如shared_pointer)? - How can I take a single element out of a boost library (e.g. shared_pointer)? Boost图形库undirected_graph:如何指定顶点类型(例如int)? - Boost Graph Library undirected_graph: how to specify the vertex type (e.g. as int)? 如何使用Boost库构建C ++代码 - how to build the c++ code with boost library 以跨平台方式在C ++中调用外部文件(例如可执行文件) - Calling external files (e.g. executables) in C++ in a cross-platform way Yocto/ Bitbake - 将构建版本(例如 PE、PR 和 PV)合并到 C++ 编译中 - Yocto/ Bitbake - incorporate build version (e.g. PE, PR & PV) into C++ compilation
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM