Displaying 1 result from an estimated 1 matches for "simple_program".
2005 Sep 04
1
.Call with C and Fortran together (PR#8122)
...lling 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.load("lib's name") and then a .Call("simple_program").
What I got?
Calling the function...
Segmentation fault
What if I change the cg function's name to pp? M...