嗨,我想編譯和運行在mac osx上簡單的RInside例子。我使用的是通過R作爲以及所有圖書館 我的繼承人R個信息最新發布的在mac osx上的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)
我怎麼繼承人嘗試編譯一個例子
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
並安裝[R安裝形式的MacPorts和RInside繼承人我的錯誤
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.
任何建議
我會相信你的話,只是刪除mac ports版本 – pyCthon
其中一個關鍵問題是...從編譯時的路徑獲取硬代碼,所以如果你的目錄佈局不同於構建框,將失敗 - 通常是Windows上的情況,也可能是在這裏。 –
@DirkEddelbuettel那麼我們是否需要下載用於OSX或Rxpp for OSX或兩者的RInside? – warship