[R-SIG-Mac] Load Fortran dynamic shared library in

Simon Urbanek simon.urbanek at r-project.org
Fri Feb 8 21:21:00 CET 2008


On Feb 8, 2008, at 3:07 PM, Ling-Jing Kao wrote:

> Hi,
>
> I am a windows user and consider switching to Mac.
> Before I buy a Mac machine, I want to be sure that I can create a
> Fortran shared object and load it into R in MacOS (Leopard).
>
> I tried it on a colleague's Mac Pro after installing R-2.6.1.dmg in  
> the system.
> According to the information on CRAN, I think R-2.6.1.dmg should
> already contain Fortran compiler.
>
> Then I use the comment  "R CMD SHLIB -o file file.f" to compile a
> fortan program "file.f".
> (I can compile this fortran code and load into R in Windows
> environment without any problem.)
>
> However, I get the following error message in Mac:
>
> carrie-pans-mac-pro:PGdlldloglike carriepan$ R CMD SHLIB -o dloglike  
> dloglike.f
> /Library/Framework/R.framework/Resources/bin/SHLIB: line 161: make:
> command not found
>
> I don't really understand the meaning of this error message.

It means that you didn't follow the instructions (it says that you  
don't have "make"). You need to install Apple's Xcode development  
tools in order to compile anything. Xcode is on the Mac OS X  
installation DVD and can also be downloaded from Apple. Please read  
the R for Mac OS X FAQ it has detailed instructions.

Cheers,
Simon


> I really appreciate if Mac users here can provide solution or even the
> procedure to create Fortran shared objective for R.
>
> Ling
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
>



More information about the R-SIG-Mac mailing list