[Rd] Fwd: linker issue

Duncan Murdoch murdoch.duncan at gmail.com
Mon Feb 3 13:22:26 CET 2014


On 14-02-03 7:00 AM, Samuel Kemp wrote:
> Hi,
>
> I am trying to compile C++ with R and I am coming up against - what I
> believe - is a linker configuration issue.
>
> For example, using has_develop() gives the following message...
>
>> has_devel()

I assume you're using the function from devtools.

It tests whether you have your development environment set up correctly 
for use with devtools, and this result shows you don't.  You might try 
using the base R tools (e.g. R CMD SHLIB from the command line) to see 
if this is a devtools problem or more basic.

If it's a devtools problem, you should contact the maintainer of that 
package.

If it's not just a devtools problem and you still need help, you need to 
describe what you did in more detail.  What is your PATH? What about 
other environment variables? What version of R are you using?  What 
version of Rtools?

Duncan Murdoch

> "C:/PROGRA~1/R/R-30~1.2/bin/i386/R" --vanilla CMD SHLIB foo.c
> gcc -m32 -I"C:/PROGRA~1/R/R-30~1.2/include" -DNDEBUG
> -I"d:/RCompile/CRANpkg/extralibs64/local/include"     -O3 -Wall  -std=gnu99
> -mtune=core2 -c foo.c -o foo.o
> gcc -m32 -shared -s -static-libgcc -o foo.dll tmp.def foo.o
> -Ld:/RCompile/CRANpkg/extralibs64/local/lib/i386
> -Ld:/RCompile/CRANpkg/extralibs64/local/lib
> -LC:/PROGRA~1/R/R-30~1.2/bin/i386 -lR
> collect2: ld returned 9 exit status
> Error in inDL(x, as.logical(local), as.logical(now), ...) :
>    unable to load shared object 'C:/TEMP/Rtmpes5hJL/foo.dll':
>    LoadLibrary failure:  The specified module could not be found.
>
>   I am running Windows 7 (32-bit), Rtools has been installed and is in my
> path (i.e. I can run gcc/g++). The object file (.o) gets created but then
> the linking goes awry.
>
> Another thing here is that I do not know where the directory RCompile is as
> it appears to be trying to link some 64-bit stuff (i.e. extralibs64).
>
> Any help/thoughts would be fantastic,
>
> Sam
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list