Skip to content
Prev 19084 / 63421 Next

hello World problem

Hi,

I'm trying to build a simple R package 'helloWorld' with just one 
function that prints 'hello World' on the C side.
I agree that it is completely useless, but I just start mixing R and C.

My C file is as follows :

#include <stdio.h>
void helloWorld() {
  printf("hello world !\n") ;
}

When I call it from R, here is what happens :
R> .C("helloWorld", PACKAGE = "helloWorld")
hello world !
list()

is it normal that 'list()' is printed ?

Thanks.

Romain