[jar@oriole.er.usgs.gov: Re: [R] loading fortran with Redhat 5.1]

Thomas Lumley thomas@biostat.washington.edu
Wed, 18 Nov 1998 10:50:09 -0800 (PST)


On Wed, 18 Nov 1998, Martin Maechler wrote:

> -------
>   Date: Wed, 18 Nov 1998 13:22:47 -0500 (EST)
>   From: "J. Andy Royle" <jar@oriole.er.usgs.gov>
>   To: Martin Maechler <maechler@stat.math.ethz.ch>
>   Subject: Re: [R] loading fortran with Redhat 5.1
>   In-Reply-To: <199811181812.TAA26068@sophie.ethz.ch>
> 
>   Hi Martin,
> 
>   The reason I was confused by this is because I used dyn.load
>   on varna.o from a Sun Ultra 10 (again compiled by g77 -c varna.f...
>   not gcc as I stated before....a typo).  Observe to following
>   from my Ultra 10:
> 

Yes, on Solaris 2.6 on an Ultra 10 the dynload demo also works this way.
Either gcc -c or cc -c produces an object file that can be dyn.loaded and
run correctly.

It isn't portable. Most Unices distinguish between the output of cc and
the shared object files produced by ld -the.appropriate.flags

I don't know if it works when you need to call R functions from the
compiled code, either.  In any case, R SHLIB is the better solution.

	-thomas

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._