Re: [f2py] undefined symbol: G77_date_and_time_0

Pearu Peterson <[email protected]> Wed, 28 Jul 2010 12:48:58 +0300
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
On Wed, Jul 28, 2010 at 12:34 PM, Audrey Hureau
<[email protected]> wrote:
> When I add -lf2c it can't find it because f2c isn't in /usr/bin/ld.
> I use f2py with following commands:
> 1- f2py ecri.f -m ecri -h ecri.pyf
> 2- f2py -c ecri.pyf ecri.f --fcompiler=gnu95
> I use f90 to compile Fortran and gcc for C programs.

Thanks for the info.
In step 2 you specify gfortran for compiling Fortran sources but since
the fortran source file has extension .f,
the numpy.distutils might use g77 instead for compiling ecri.f. Try
the following:

cp ecri.f ecri.f90
f2py -c ecri.pyf ecri.f90 --fcompiler=gnu95

HTH,
Pearu