Re: [f2py] undefined symbol: G77_date_and_time_0

Pearu Peterson <[email protected]> Wed, 28 Jul 2010 13:18:53 +0300
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
On Wed, Jul 28, 2010 at 1:01 PM, Audrey Hureau <[email protected]> wrote:
> When I use the " f2py -c ecri.pyf ecri.f90 --fcompiler=gnu95" command, I
> have too many errors from another file included in ecri.f90 and which
> normally works fine.

So you have more than just one Fortran source file? All Fortran files
should be compiled and linked with the f2py generated extension
module:

f2py -c ecri.pyf *.f --fcompiler=gnu95

Not doing so is also the source of undefined symbol errors.

Another option is to compile Fortran codes separately and then use
object files in f2py command line. For example,

gfortran -c -fPIC *.f
f2py -c ecri.pyf  --fcompiler=gnu95 *.o

Pearu