[Rd] RCMD SHLIB problem in 64 bits
Qiao Kang
qk at st-andrews.ac.uk
Wed Oct 8 18:57:12 CEST 2014
I am trying to build a dll writen in C to be called by R.
Interestingly, when I set the global environment variable PATH to be
"c:\Rtools\bin;C:\Rtools\gcc-4.6.3;C:\Program Files\R\R-3.1.1\bin\*i386*;"
and I typed "RCMD SHLIB Permutation.c" in Cygwin, the dll was compiled and
I can sucessfully call functions after I had loaded it into 32 bits R via
.Call.
However, now I want to run the same function in 64 bits R. I changed
the global environment variable PATH to be
"c:\Rtools\bin;C:\Rtools\gcc-4.6.3;C:\Program Files\R\R-3.1.1\bin\*x64*;",
opened Cygwin again and typed "RCMD SHLIB Permutation.c" in Cygwin. Error
message appeared on Cywin console.
$ RCMD SHLIB Permutation.c
gcc -m64 -shared -s -static-libgcc -o Permutation.dll tmp.def Permutation.o
-Ld:/RCompile/CRANpkg/extralibs64/local/lib/x64
-Ld:/RCompile/CRANpkg/extralibs64/local/lib
-LC:/PROGRA~1/R/R-31~1.1/bin/x64 -lR
C:/PROGRA~1/R/R-31~1.1/bin/x64/R.dll: file not recognized:
My version of R is the latest 3.1.1 and my Rtools is also the latest
version 31
I am not sure why this is happening and I have been struggled about this
for two days.
[[alternative HTML version deleted]]
More information about the R-devel
mailing list