[R] dyn.load problem

O. Neto otnetobr at yahoo.com.br
Sat Nov 13 23:28:08 CET 2004


Hi, Uwe.

    Thank you for help.

    Yesterday another R-user Mr. Ramasamy told me to do a simple program
such as (changing too the directories, now C:/minhadll/):

/*file conv.c*/

#include <R.h>
void printhello (){
  Rprintf("%s", "hello world\n");
}

    When I use C:\R\rw2000\bin>RCMD SHLIB -o c:/minhadll/meuteste.dll
c:/minhadll/conv.c
 to compile this one. Below is the output.

C:\R\rw2000\bin> RCMD SHLIB -o c:/minhadll/meuteste.dll c:/minhadll/conv.c
making c:/minhadll/conv.d from c:/minhadll/conv.c
gcc   -IC:/R/RW2000/include -Wall -O2   -c c:/minhadll/conv.c -o
c:/minhadll/conv.o
ar cr c:/minhadll/meuteste.a c:/minhadll/conv.o
ranlib c:/minhadll/meuteste.a
gcc  --shared -s  -o c:/minhadll/meuteste.dll c:/minhadll/meuteste.def
c:/minhadll/meuteste.a  -LC:/R/RW2000/src/gnuwin32  -lg2c -lR

    The result is " meuteste.dll"  located in C:/minhadll/meuteste.dll. Now,
talking about paths:
    I believe that I have make a correct way... but I'll list here to you:

SET PATH=C:\Rtools\;C:\Perl\bin\;C:\MinGW\bin;C:\R\rw2000\include\
        Is it correct?
Thank you again for help me. I'm trying to do a dll for 3 weeks or more,
without a good result.

PS: The same error dyn.load appears


O. Neto




More information about the R-help mailing list