On 2/8/07, Oleg Sklyar <osklyar at ebi.ac.uk> wrote:
On Windows you need:
- download and install Cygwin (cygwin.com) with default options,
supposedly you install into c:\cygwin. Add path to
c:\cygwin\bin;c:\cygwin\lib to your system PATH
No. You don't need Cygwin. I don't have it and I can compile Tim's code
without any problem.
Please see bottom of my message for which I used Tim's code without any
modification.
My assumption is rather that the path is not set correctly so he can call R
from the command line.
Maybe you could check, Tim, if you can start Rterm.exe or Rgui.exe from the
command line.
If not, this should be the first thing to fix.
For help files:
- get MS hhc, comes as part of htmlhelp.exe from here:
this is Microsoft HTML Help Compiler, add path to it to your PATH
- you might want to consider MikTex, dowload, install, add to path if
you have a package and a help system a should be built
Yes, as you write for the help files. But I think it is not necessary if
someone wants to make his/her first steps to interface to C from R.
Best,
Roland
P.S.
Here is the transcript of my shell session in emacs using Tim's code:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
c:\deletefolder\Rsandbox>R CMD SHLIB hello.c
R CMD SHLIB hello.c
making hello.d from hello.c
gcc -IC:/rolandprogs/R-2.3.1/include -Wall -O2 -c hello.c -o hello.o
gcc -shared -s -o hello.dll hello.def hello.o -LC:/rolandprogs/R-2.3.1/bin
-lR
c:\deletefolder\Rsandbox>Rterm --no-save
Rterm --no-save
R : Copyright 2006, The R Foundation for Statistical Computing
Version 2.3.1 (2006-06-01)
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
hello2(3)
Hello, world!
Hello, world!
Hello, world!
[[1]]
[1] 3
[[alternative HTML version deleted]]