Have you tried using tools:::package_native_routine_registration_skeleton()? If you don't like its output, you can easily edit its results and still avoid most pitfalls.
Cheers, Jari Oksanen ________________________________________ From: R-devel <[email protected]> on behalf of Berend Hasselman <[email protected]> Sent: 10 May 2017 09:48 To: Christophe Dutang Cc: [email protected] Subject: Re: [Rd] registering Fortran routines in R packages Christophe, > On 10 May 2017, at 08:08, Christophe Dutang <[email protected]> wrote: > > Thanks for your email. > > I try to change the name in lowercase but it conflicts with a C > implementation also named halton. So I rename the C function halton2() and > sobol2() while the Fortran function are HALTON() and SOBOL() (I also try > lower case in the Fortran code). Unfortunately, it does not help since I get > > init.c:97:25: error: use of undeclared identifier 'halton_'; did you mean > 'halton2'? > {"halton", (DL_FUNC) &F77_SUB(halton), 7}, > > My current solution is to comment FortEntries array and use > R_useDynamicSymbols(dll, TRUE) for a dynamic search of Fortran routines. Have a look at my package geigen and its init.c. Could it be that you are missing extern declarations for the Fortran routines? Berend ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
