[Rd] Calling C in R in Windows 64 bit

From: <aysun.cetinyurek_at_ulg.ac.be>
Date: Wed, 03 Nov 2010 13:20:28 +0100 (CET)

Dear developers,

I am trying to run some C/ Fortran code in R. Although I have experience with that in Windows (Vista) 32 bit, I could not succeed in 64 bit. I downloaded the following:
- R 2.12.0

-Afterwards, I changed the path as:

‘C:\Program Files\R\R-2.12.0\bin;C:\Rtools\bin;C:\Rtools\MinGW64\bin;C:\Program Files\HTML Help Workshop;C:\Program Files (x86)\CodeBlocks\bin;C:\Program Files\Insight\bin;C:\Rtools\perl\bin;C:\Program Files (x86)\MiKTeX 2.9\miktex\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Broadcom\Broadcom 802.11\Driver;’

'x86_64-w64-mingw32-gcc -c COXPHmatprod24delta.c -o COXPHmatprod24delta.o -I"C:\Program Files\R\R-2.12.0\include"'

the above command produced the file with .o extension.

-Afterwards I typed

'x86_64-w64-mingw32-gcc -shared -o COXPHmatprod24delta.dll COXPHmatprod24delta.o -I"C:\Program Files\R\R-2.12.0\include" -L"C:\Program Files\R\R-2.12.0\bin" –lR'

it produces the error:
'x86_64-w64-mingw32-gcc: -lR: No such file or directory'

-The problem here is that it does not produce .dll file. I cannot find the solution to that although I tried for 2 days.

--Alternatively I tried ‘R CMD SHLIB COXPHmatprod24delta.c’ and it produces the error:
'cygwin warning:
  MS-DOS style path detected: C:/PROGRA~1/R/R-212~1.0/etc/i386/Makeconf   Preferred POSIX equivalent is: /cygdrive/c/PROGRA~1/R/R-212~1.0/etc/i386/Makec onf
  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 nm: not found
gcc -shared -s -static-libgcc -o COXPHmatprod24delta.dll tmp.def COXPHmatprod24d elta.o -LC:/PROGRA~1/R/R-212~1.0/bin/i386 -lR gcc: not found'

Every comment is appreciated. Many thanks in advance.

Sincerely Yours,

Aysun Cetinyurek

Services de Statistique
Institut de Mathématique (B37)
Grande Traverse, 12
B4000 Liège

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 03 Nov 2010 - 12:23:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 04 Nov 2010 - 01:00:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive