search for: r_init_hellofromc

Displaying 1 result from an estimated 1 matches for "r_init_hellofromc".

2003 May 16
1
Reloading a shared library with dyn.load
...<R_ext/Applic.h> #include <stdio.h> void HelloFromC(char **result) { *result = (char *) R_alloc(20,sizeof(char)); sprintf(*result,"Hello from C!"); } static const R_CMethodDef CEntries[] = { {"HelloFromC",(DL_FUNC) &HelloFromC,1}, {NULL,NULL,0} }; void R_init_HelloFromC(DllInfo *info) { R_registerRoutines(info,CEntries,NULL,NULL,NULL); } ---------------------------------------------------------------- c:\james\HelloFromC> Rcmd SHLIB HelloFromC making HelloFromC.d from HelloFromC.c gcc -IC:/JAMES/rw1070/src/include -Wall -O2 -c HelloFromC.c -o HelloFro...