Re: [R] C interface

2010-06-18 Thread Romain Francois
Hello, This is not the appropriate mailing list. Use R-devel for questions about C, etc ... One thing that might help you is the inline package. require( inline ) fx - cfunction( signature( s = numeric ), ' SEXP result; PROTECT(result = NEW_NUMERIC(1)); double*

Re: [R] C interface

2010-06-18 Thread Matt Shotwell
Michael, Your function 'test' doesn't utilize any C++ features. Is there another reason you are using a C++ compiler (g++)? If not, why not just use a C compiler? You can then get rid of the 'extern C{}' wrapper, the '__cdecl' declaration, and the MAKEFLAGS variable. Also, you may know that the