集成R,C++环境:eclipse+Rcpp+RInside

Rcpp only works with the GNU toolchain.

http://www.murdoch-sutherland.com/Rtools/index.html

注意:只能用Rtools的gcc编译

环境配置

path:

我的电脑:%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;D:\lua;C:\Program Files\Lua\5.1;C:\Program Files\Lua\5.1\clibs;C:\StrategyStudio\lua\system;C:\StrategyStudio\numlua;D:\TortoiseSVN\bin;C:\Qt\4.7.4\bin;C:\Qt\4.7.4\qmake;C:\Rtools\bin;C:\Rtools\gcc-4.6.3\bin;C:\R\R-2.15.2\bin\i386

eclipse中,Environment/PATH:D:\eclipse;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Rtools\bin;C:\Rtools\gcc-4.6.3\bin;C:\R\R-2.15.2\bin\i386;

setting:

Cross G++ Compiler:g++

-DINSIDE -I"C:\R\R-2.15.2\include" -I"C:\R\R-2.15.2\library\Rcpp\include" -I"C:\R\R-2.15.2\library\Rcpp\include\Rcpp" -I"C:\R\R-2.15.2\library\RInside\include" -I"C:\Rtools\gcc-4.6.3\include" -O0 -g3 -Wall -c -fmessage-length=0 -lstdc++

include:

Miscellaneous:-c -fmessage-length=0 -lstdc++

Cross G++ Linker:g++

-L"C:\R\R-2.15.2\bin\i386" -L"C:\R\R-2.15.2\library\Rcpp\libs\i386" -L"C:\R\R-2.15.2\library\RInside\libs\i386" -L"C:\Rtools\gcc-4.6.3\lib"

Libraries:

libRInside.dll 不能被include进来!不然出错:

multiple definition of *** first defined here

你可能感兴趣的:(C++,r,Rcpp,RInside)