嗨,我正在尝试编译和运行Mac OSX上的简单renside示例。我正在使用R安装表单Macports和Rinside,以及所有库的最新版本 继承人我的资源

R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows"
Copyright (C) 2012 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin11.4.0/x86_64 (64-bit)
.

Heres我如何尝试编译一个例子

 g++-mp-4.7 -I/opt/local/lib/R/library/RInside/include/
    -I/opt/local/lib/R/library/Rcpp/include/ -I/opt/local/lib/R/include/ -L/opt/local/lib/R/library/RInside/libs/ -L/opt/local/lib/R/library/Rcpp/libs/ -lRInside -lRcpp test.cpp -o test
.

和我的错误

In file included from /opt/local/lib/R/library/Rcpp/include/RcppCommon.h:155:0,
                 from /opt/local/lib/R/library/Rcpp/include/Rcpp.h:27,
                 from /opt/local/lib/R/library/RInside/include/RInsideCommon.h:31,
                 from /opt/local/lib/R/library/RInside/include/RInside.h:26,
                 from thread_safe_test.cpp:5:
/opt/local/lib/R/include/R.h:34:21: fatal error: Rconfig.h: No such file or directory
compilation terminated.
.

任何建议

有帮助吗?

解决方案

正如我回忆,你必须从OS X的源代码编译in.尝试RCPP-Devel列表的档案更多。

其他提示

为什么不使用 r-project.org 并下载编译器等。来自 http://r.research.att.com/tools/ ?这是我思考的首选方法。对我来说,这种方法有效。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top