是否可以在[win-builder](http://win-builder.r-project.org/)上构建使用Rcpp和Boost.Thread的R包? [英] Is it possible to build an R package, which use Rcpp and Boost.Thread, on [win-builder](http://win-builder.r-project.org/)?

查看:71
本文介绍了是否可以在[win-builder](http://win-builder.r-project.org/)上构建使用Rcpp和Boost.Thread的R包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我制作了一个R包,它使用Rcpp集成R和C ++. C ++库Boost用于多线程.我想知道我的软件包是否可以在 http://win-builder.r-project上构建.org/?

Recently, I have made an R package, which use Rcpp to integrate R and C++. And the C++ library Boost is used for multithreading. I wonder if is it possible for my package to be built on http://win-builder.r-project.org/?

我发现定义了一个Make变量--- BOOSTLIB ---,如 http://cran.r-project.org/bin/windows/contrib/ThirdPartySoftware.html .

I found that a Make variable --- BOOSTLIB --- is defined, as shown in http://cran.r-project.org/bin/windows/contrib/ThirdPartySoftware.html.

我尝试使用仅标头的库,没关系,但是当我尝试使用单独编译的库Boost.Thread时,出现没有这样的文件"或未定义的引用"错误.也许lib路径是错误的.但是,我几乎找不到在win-builder上解释过的任何单词.我只能使用仅标头的库,还是可以配置Makevars.win来查找单独编译的Boost.Thread库?

I tried to use the header-only libraries, it's OK, but when I tried to use separately-compiled library Boost.Thread, either "no such file" or "undefined reference" error came out. Maybe the lib path was wrong. However, I can hardly find any words explained on win-builder. Can I only use the header-only libraries or Is there a way to configure Makevars.win to find the separately-compiled Boost.Thread library?

或者也许我可以在文件包中包含Boost源文件,但是我认为这不是一个好方法,而且我也不知道如何包含(我还没有尝试过).

Or maybe I can include Boost source filed in my package, but I don't think it is a good way, and I also don't know how to include (I haven't tried).

我发现有一个B软件包BH试图为R提供Boost.这非常有帮助,我非常感谢BH的作者所做的工作,但是,当我问这个问题时不包含Boost.Thread.问题.也许我可以等到它们包含Boost.Thread为止.但是我现在喜欢自己动手做,以便我可以学习更多.

I found there is an R package BH trying to provide Boost for R. It is very helpful, and I appreciate the work done by the authors of BH very much, however, the Boost.Thread is not included when I asked this question. Maybe I can wait until when they include Boost.Thread. But I prefer to do it myself now, so I can learn more.

推荐答案

此处的当前 BH 维护者.几点:

Current BH maintainer here. Several points:

  • 如前所述,我们的 BH 包仅提供Boost中的标头(的一部分).该软件包会根据需要增长,我们可能会尽快添加(因为我有一个请求).

  • As noted, our BH package only provides (a subset of) headers from Boost. The package grows as needed, we may add more soon (as I have one request in).

Win-Builder支持BOOSTLIB在Windows上也设置标题.正如评论所说,我认为它不提供库.在 RQuantLib 中,我仅使用它来获取QuantLib类所需的标头.

Win-Builder supports BOOSTLIB to also set headers on Windows; as the comments say I do not think it provides libraries. In RQuantLib I only use it to get headers as well which are needed by the QuantLib classes.

几个软件包已经解决了Windows上的线程问题; BH合著者Jay和Mike在他们的 bigmemory 软件包及其支持软件包(例如 同步性.但是到目前为止,它们还没有获得Windows支持,因为Windows与众不同,并且在某些Unix习惯上感到痛苦.

Several package have fought the threading issue on Windows; the fellow BH-coauthors Jay and Mike tried in the context of their bigmemory package and its support packages such as synchronicity. But as of now, they are not provided Windows support because, well, Windows is different and at pains with some Unix idioms.

这是自述文件 ="http://cran.r-project.org/package=synchronicity">同步性:

Here is the README from synchronicity:

目前仅在UNIX平台上支持

synchronicity,因为 在带有64位Windows的Boost或MinGW中的错误.我们将扩大 这些问题一经解决,便会立即支持Windows.

synchronicity is currently only supported on unix platforms because of a bug in either Boost or MinGW with 64-bit Windows. We'll expand support to Windows as soon as these have been resolved.

如果要将此软件包与32位Windows一起使用,可能是 可能(在DESCRIPTION中的OS_type行中注释).

If you want to use this package with 32-bit Windows, it may be possible (comment out the OS_type line in DESCRIPTION).

2010年10月30日.修改后的配置可解决Solaris问题.

October 30, 2010. Modified configure to fix up a Solaris problem.

总之,没有 no 预制工具供您依赖.

No in short there is no pre-built tool for you to rely on.

这篇关于是否可以在[win-builder](http://win-builder.r-project.org/)上构建使用Rcpp和Boost.Thread的R包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆