Le 12/05/10 00:23, Elizabeth Lawson a écrit :
Why would I want to remove (rm) the file. I am trying to compile it.
make thinks : "Why would I compile this file, the result is already there"
First time :
rom...@naxos /tmp $ R CMD SHLIB hello.c
gcc-4.2 -arch x86_64 -std=gnu99
-I/Library/Frameworks/R.framework/Resources/include
-I/Library/Frameworks/R.framework/Resources/include/x86_64
-I/usr/local/include -fPIC -g -O3 -Wall -pipe -Wno-variadic-macros
-c hello.c -o hello.o
gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib
-Wl,-headerpad_max_install_names -undefined dynamic_lookup
-single_module -multiply_defined suppress -L/usr/local/lib -o hello.so
hello.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation
Second time:
rom...@naxos /tmp $ R CMD SHLIB hello.c
make: Nothing to be done for `all'.
Does that help ?
Romain
BTW, your second post is more useful than the first one as you actually
partly follow the posting guide and show some example code.
For the file hello2.c
/* hello.c: display a message on the screen */
#include<stdio.h>
main()
{
printf("hello, world\n");
}
I used gcc hello2.c and it works fine.
But fort eh file hello.c
#include<R.h>
void hello(int *n)
{
int i;
for(i=0; i< *n; i++) {
Rprintf("Hello, world!\n");
}
}
I try R CMD SHLIB hello.c and I ge tthe error
make: Nothing to be done for `all'.
Why does one compile and the other not?
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://bit.ly/9aKDM9 : embed images in Rd documents
|- http://tr.im/OIXN : raster images and RImageJ
|- http://tr.im/OcQe : Rcpp 0.7.7
______________________________________________
R-help@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.