A very common question on StackOverflow with regards to C++/R or C/R package integration is regarding the error in dyn.load()
, e.g.
> ## within R
> Error in .Call("function_c") : C symbol name "function_c" not in load table
whereby function_c
is some function in C like
SEXP function_c() {
Rprintf("Hello World!\n"); // manually changed
return(R_NilValue);
}
This error come sup due to many types of mistakes, e.g. incorrect compliation, misnamed functions, the user didn't use extern "C"
for Cpp code, etc.
Question: Is there any way to view all "available" objects which the user could load via dyn.load()
after compilation?