Dear all, I have a problem in calling my C code from R. If I do not need to use #include<R.h>, the codes work properly. But when I need to use it, my codes produce an error as:
logpostCLM.cpp:7:15: error: R.h: No such file or directory logpostCLM.cpp:8:24: error: Rinternals.h: No such file or directory logpostCLM.cpp:9:19: error: Rmath.h: No such file or directory logpostCLM.cpp:10:24: error: R_ext/BLAS.h: No such file or directory My computer is an HP using Window Vista. My code in codeblocks starts as below: typedef double *vector; extern "C"{ #include <R.h> #include <Rinternals.h> #include <Rmath.h> #include <R_ext/BLAS.h> void logpostCLM(int *n, int *nk,int *nZ,int *len_sbin,double *phi,double *tau,double *lksi, double *coeff, double *thetaml, double *L,double *P,double *lB, double *CL,double *CR, double *Z,double *lpost) { /* n=sample size */ Thank you very much. Regards, A.C.Y ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.