On 04/05/2011 11:49 AM, xavier abulker wrote:> Hello,
> I'm trying to build a simple cpp file using the R CMD SHLIB command and
I always
> receive the same error message:
>
> cygwin warning:
> MS-DOS style path detected: C:/PROGRA~1/R/R-212~1.1/etc/i386/Makeconf
> Preferred POSIX equivalent is:
> /cygdrive/c/PROGRA~1/R/R-212~1.1/etc/i386/Makeconf
> CYGWIN environment variable option "nodosfilewarning" turns
off this warning.
> Consult the user's guide for more details about POSIX paths:
> http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
> gcc -shared -s -static-libgcc -o hello.dll tmp.def hello.o Rscript -e
> Rcpp:::LdFlags() -LC:/PROGRA~1
It looks as though you have somehow got some strange environment
variables or contents of a Makevars file set, possibly because you have
install Rcpp. The "Rscript -e Rcpp:::LdFlags()" should not be there.
Duncan Murdoch
> /R/R-212~1.1/bin/i386 -lR
> gcc.exe: Rscript: No such file or directory
It looks as though the file> Here is what I do:
>
> * From the cpp file below:
>
> //file hello.cpp
> #include<R.h>
> void sayhello() {
> printf("Hello world\n");
> }
>
> * I build the file with the DOS command:
>
> R CMD SHLIB hello.c
>
>
> My confirguration is
> R 2.12.2
> Windows XP 2002 SP3
> I have installed the Rtools components and have included the following
links
> into my path:
>
> C:\Rtools\bin;
> C:\Rtools\perl\bin;
> C:\Rtools\MinGW\bin;
> C:\Program Files\R\R-2.12.1\bin
>
> Thanks a lot for you help
> Xavier
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.