[R] Linking R with Fortran 90: make: m2c: Command not found

Mike Prager mike.prager at noaa.gov
Tue Oct 3 22:58:32 CEST 2006


Jason Liao <jg_liao at yahoo.com> wrote:

> Following the setup in Prof.Duncan Murdoch's page, I have successfully compiled the DLL for one Fortran 95 program using Gfortran and got 300 times speed  boost.  For the second set of fortran programs, However, I have this error message
> 
> R CMD SHLIB -o jiangang    kdtree2.f90  jian.f90 gang.f90
> m2c    -o jian.o jian.mod
> make: m2c: Command not found
> make: *** [jian.o] Error 127
> 
> Can anyone point me to the direction to solve this problem. Thank you in advance. 
>  

As there has been no other answer, I will point something out,
even though I am NOT an expert in this procedure.  m2c is a
compiler for the language Modula-2.  You are not using that (are
you?), but it seems to be invoked (by make) because of your
Fortran module file (jian.mod).  Fortran compilers in my
experience don't need to be told to look for x.mod when you have
specified x.obj.  Can you run this procedure without mentioning
the module file?

I hope this helps.

MHP

-- 
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.



More information about the R-help mailing list