Dav*_*idH 10 c++ g++ environment-variables rcpp
我已经查询了与我的具体问题相关的SO上的现有条目,但仍然无法解决它.
我正在尝试使用我的机器在工作,我有限制管理员权限,但我可以运行Rtools.exe,所以我安装它.
我对R的设置是:
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
version.string R version 3.3.0 (2016-05-03)
Run Code Online (Sandbox Code Playgroud)
我是RStudion版本0.99.902.我安装了Rtools版本3.3.0.1959.
所有R,Rstudio和Rtools都安装在C:/ WORK /中,这是我有一些有限的管理员权限.
在我的系统ENV变量中,我已经设置:
C:\\WORK\\Rtools\\bin; C:\\WORK\\Rtools\\gcc- 4.6.3\\bin; C:\\WORK\\R-3.3.0\\bin\\x64;"
Run Code Online (Sandbox Code Playgroud)
我跑的时候
system('where make')
Run Code Online (Sandbox Code Playgroud)
我明白了
C:\WORK\Rtools\bin\make.exe
Run Code Online (Sandbox Code Playgroud)
我跑的时候
system('g++ -v')
Run Code Online (Sandbox Code Playgroud)
我明白了:
Using built-in specs.
COLLECT_GCC=C:\WORK\Rtools\GCC-46~1.3\bin\G__~1.EXE
COLLECT_LTO_WRAPPER=c:/WORK/rtools/gcc-46~1.3/bin/../libexec/gcc/i686-w64- mingw32/4.6.3/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: /data/gannet/ripley/Sources/mingw-test3/src/gcc/configure --host=i686-w64-mingw32 --build=x86_64-linux-gnu --target=i686-w64-mingw32 --with-sysroot=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/mingw32 --prefix=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/mingw32 --with-gmp=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --with-mpfr=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --with-mpc=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --disable-shared --enable-static --enable-targets=all --enable-languages=c,c++,fortran --enable-libgomp --enable-sjlj-exceptions --enable-fully-dynamic-string --disable-nls --disable-werror --enable-checking=release --disable-win32-registry --disable-rpath --disable-werror CFLAGS='-O2 -mtune=core2 -fomit-frame-pointer' LDFLAGS=
Thread model: win32
gcc version 4.6.3 20111208 (prerelease) (GCC)
Run Code Online (Sandbox Code Playgroud)
当我编译时,我收到此错误:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created!
c:/Rtools/mingw_64/bin/g++: not found
Run Code Online (Sandbox Code Playgroud)
我的问题是:为什么R仍然在寻找g ++
c:/Rtools/mingw_64/bin/g++
Run Code Online (Sandbox Code Playgroud)
我没有设置R来寻找它
C:/WORK/Rtools?
Run Code Online (Sandbox Code Playgroud)
即使我手动添加
c:/WORK/Rtools/mingw_64/bin/g++
Run Code Online (Sandbox Code Playgroud)
在ENV变量中,我仍然遇到了同样的错误.(由于管理员权限,我无法在C:/中创建Rtools文件夹.)
有没有人遇到这个具体问题?
小智 11
该路径c:/Rtools/mingw_64/bin/
被硬编码到Makeconf
位于R安装中的某个文件中(在我的例子中C:\Progs\R\R-3.4.1\etc\x64
),作为变量BINPREF的值.
最简单的方法是将此路径更改为您的路径C:/WORK/Rtools/bin
(在我的情况下C:/Progs/RTools/3.4/mingw_64/bin/
).这对我来说是R-3.4.1和Rtools3.4的全新安装,也是最小的例子.
发生的情况是R 3.3.x需要使用 RTools 34 而不是33。
删除 rtools 安装,然后按照此处的指南进行操作:
http://thecoatlessprofessor.com/programming/rcpp/install-rtools-for-rcpp/
@David,您需要删除 的所有实例C:\WORK\Rtools\<something>
和任何重复项(例如C:\WORK\R-3.3.0\bin\x64
出现两次。)然后添加:
c:\WORK\Rtools\bin; c:\WORK\Rtools\mingw_32\bin;
归档时间: |
|
查看次数: |
5049 次 |
最近记录: |