The message says you shouldn't be using the string 'BT' in the .Fortran
call, you should be using the object that was produced by
R_registerRoutines. That's probably named BT (without any quotes),
though you can add a prefix in useDynLib() in your NAMESPACE file.
So your call should look like this:
res <- .Fortran(BT, as.double(Temp), as.double(y), as.integer(icode))
Duncan Murdoch
On 25/03/2023 9:01 a.m., Shawn Way wrote:
Sorry to kind of repeat this but I really didn't understand the issues with the
prior thread and how it relates to my issue.
I'm getting the error message in
B_T <- BT(Temp)
Error in BT(Temp) : DLL requires the use of native symbols
Execution halted
And frankly, I have no idea what this means. The function call is pretty
simple and meets the requirement of .Fortran
res <- .Fortran('BT', as.double(Temp), as.double(y), as.integer(icode))
and the following matches the R-ext's method for using registration:
extern void F77_NAME(bt)(double *T, double *B, int *icode);
void R_init_IAPWS95(DllInfo *dll)
{
R_registerRoutines(dll, NULL, NULL, FortranEntries, NULL);
R_useDynamicSymbols(dll, FALSE);
R_forceSymbols(dll, TRUE);
}
With
static const R_FortranMethodDef FortranEntries[] = {
{"bt", (DL_FUNC) &F77_NAME(bt), 3},
{NULL, NULL, 0}
};
Furthermore the NAMESPACE includes:
useDynLib(splines, .registration = TRUE, .fixes = "C_")
which matches R-ext.
Since this is only occurring on the Linux versions for the software and I use
windows, can someone point me in the right direction to fix this error?
______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel