Ubuntu のパッケージにある標準的な例で RInside を使用しようとしています。インストール後、RInside のソースで make コマンドを使用しました。
私の OS に関する情報: gcc バージョン 4.8.2 (Ubuntu 4.8.2-19ubuntu1)、GNU Make 3.81、R バージョン 3.0.2 (2013-09-25)、RInside 0.2.11、および Ubuntu 14.04。
ここにコンパイルエラーがあります。誰でも私を助けることができますか?: )
g++ -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/local/lib/R/site-library/RInside/include -O3 -pipe -g -Wall rinside_module_sample0.cpp -L/usr/lib/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/RInside/lib -lRInside -Wl,-rpath,/usr/local/lib/R/site-library/RInside/lib -o rinside_module_sample0
In file included from /usr/local/lib/R/site-library/Rcpp/include/Rcpp.h:64:0,
from /usr/local/lib/R/site-library/RInside/include/RInsideCommon.h:38,
from /usr/local/lib/R/site-library/RInside/include/RInside.h:26,
from rinside_module_sample0.cpp:7:
rinside_module_sample0.cpp: In function ‘int main(int, char**)’:
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/Module.h:451:5: error: ‘Shield’ was not declared in this scope
Shield<SEXP> __load_module_call__( Rf_lang2( GET_MODULE_SYM, _rcpp_module_boot_##NAME() ); \
^
rinside_module_sample0.cpp:27:18: note: in expansion of macro ‘LOAD_RCPP_MODULE’
R["bling"] = LOAD_RCPP_MODULE(bling) ;
^
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/Module.h:451:5: note: suggested alternative:
Shield<SEXP> __load_module_call__( Rf_lang2( GET_MODULE_SYM, _rcpp_module_boot_##NAME() ); \
^
rinside_module_sample0.cpp:27:18: note: in expansion of macro ‘LOAD_RCPP_MODULE’
R["bling"] = LOAD_RCPP_MODULE(bling) ;
^
In file included from /usr/local/lib/R/site-library/Rcpp/include/Rcpp/protection/protection.h:21:0,
from /usr/local/lib/R/site-library/Rcpp/include/RcppCommon.h:129,
from /usr/local/lib/R/site-library/Rcpp/include/Rcpp.h:27,
from /usr/local/lib/R/site-library/RInside/include/RInsideCommon.h:38,
from /usr/local/lib/R/site-library/RInside/include/RInside.h:26,
from rinside_module_sample0.cpp:7:
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/protection/Shield.h:29:11: note: ‘Rcpp::Shield’
class Shield{
^
In file included from /usr/local/lib/R/site-library/Rcpp/include/Rcpp.h:64:0,
from /usr/local/lib/R/site-library/RInside/include/RInsideCommon.h:38,
from /usr/local/lib/R/site-library/RInside/include/RInside.h:26,
from rinside_module_sample0.cpp:7:
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/Module.h:451:16: error: expected primary-expression before ‘>’ token
Shield<SEXP> __load_module_call__( Rf_lang2( GET_MODULE_SYM, _rcpp_module_boot_##NAME() ); \
^
rinside_module_sample0.cpp:27:18: note: in expansion of macro ‘LOAD_RCPP_MODULE’
R["bling"] = LOAD_RCPP_MODULE(bling) ;
^
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/Module.h:451:94: error: expected ‘)’ before ‘;’ token
Shield<SEXP> __load_module_call__( Rf_lang2( GET_MODULE_SYM, _rcpp_module_boot_##NAME() ); \
^
rinside_module_sample0.cpp:27:18: note: in expansion of macro ‘LOAD_RCPP_MODULE’
R["bling"] = LOAD_RCPP_MODULE(bling) ;
^
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/Module.h:452:13: error: ‘__load_module_call__’ was not declared in this scope
Rf_eval(__load_module_call__), R_GlobalEnv );
^
rinside_module_sample0.cpp:27:18: note: in expansion of macro ‘LOAD_RCPP_MODULE’
R["bling"] = LOAD_RCPP_MODULE(bling) ;
^
/usr/local/lib/R/site-library/Rcpp/include/Rcpp/Module.h:452:48: error: expected ‘;’ before ‘)’ token
Rf_eval(__load_module_call__), R_GlobalEnv );
^
rinside_module_sample0.cpp:27:18: note: in expansion of macro ‘LOAD_RCPP_MODULE’
R["bling"] = LOAD_RCPP_MODULE(bling) ;
^
make: *** [rinside_module_sample0] Error 1