Skip to content

dyn.load() function problem help!

4 messages · Mu Yunming, Thomas Lumley, Brian Ripley +1 more

#
First of all, thank you very much for your quick response.
Yes, I typed R CMD SHLIB aaa.o under Unix. Before I did that, I complied my 
fortran source code using f90 aaa.f90, which produced aaa.o.
in
My source code is writen in fortran 90 and i complied the source code using 
command f90. How do you think I should complie my source file and build the 
shared library?
Best,

Yunming *^_^*
#
On Wed, 18 Jun 2003, Mu Yunming wrote:

            
You probably need to figure this out: R doesn't explicitly support F90 on
any platform.

Two things are needed
1/  You have to be able to create a DLL that is properly linked to all the
libraries it needs.  Your compiler documentation should tell you how to do
this.

2/ The functions you call from R need to use the same calling conventions
as the compilers used to compiler R.  Duncan Murdoch has information at
 http://www.stats.uwo.ca/faculty/murdoch/software/compilingDLLs/
that describes how to do this for various compilers. Even if your's isn't
on the list this might still be helpful

	-thomas
#
On Wed, 18 Jun 2003, Thomas Lumley wrote:

            
That's the main step.  Something like

f90 -G -o aaa.so aaa.f

might well do it (that's the Solaris syntax, BTW).
That's for Windows: he did say `Unix', unspecified.
#
On Wed, 18 Jun 2003 09:09:10 -0700 (PDT), you wrote in message
<Pine.A41.4.44.0306180902440.52254-100000 at homer33.u.washington.edu>:
That web page is Windows-specific, so most of the solutions there
won't work on Yunming's Unix system, but I imagine the issues are
similar.

Duncan Murdoch