search for: protoccallsfsub0

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

2005 Sep 04
1
.Call with C and Fortran together (PR#8122)
...hared lib. Look at the files: File: prog.f ------------- subroutine cg() write(*,*) 'Just a simple test' end subroutine program() write(*,*) 'Calling the function...' call cg() end File test.h ------------ #include "cfortran.h" PROTOCCALLSFSUB0(PROGRAM,program) #define program() CCALLSFSUB0(PROGRAM,program) File test.c ------------ #include <R.h> #include <Rdefines.h> #include <stdio.h> SEXP simple_program(){ program(); return R_NilValue; } I compile the C and Fortran souces into a shared lib, open R, do a dyn.l...