On Fri, 23 May 2003, Alex Randriamiharisoa wrote:
> Dear R-users,
> After the reading of "Writing R extensions",
"readme.packages", "Using
> external compilers with
> R", ..., I have tried to create a DLL for my Fortran file using the
command:
>
> g77 --shared -o robeth.dll robeth.f
>
> and failed with several messages as :
> c:\temp/ccU8N5fb.o: ... undefined reference to 'realpr_'
> c:\temp/ccU8N5fb.o: ... undefined reference to 'dblepr_'
> c:\temp/ccU8N5fb.o: ... undefined reference to 'intpr_'
> c:\temp/ccU8N5fb.o: ... undefined reference to 'rexit_'
>
> What I have missed. If I insert #include <R.h> at the top of the
file, the
> MinGW
> g77 compiler exits immediately => "undefined or invalid #
directives"
>
These are references to R.dll, which is not linked.
Perhaps try
Rcmd SHLIB robeth.f
to use the build train that will link correctly.
> I've tested on R Version 1.5.1 and 1.7.0, for windows. If a special
> library is needed,
> someone could send it to me by mail.
> Thanks for your help.
> Alex R.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no