[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #FOV-989930]: Fortran compiling error



Hi John,

I wrote:
> The configure script figures out what flags are needed for
> everything and gets it right.  In particular, you don't need
> -Df2cFortran in CPPFLAGS, and the "-m64" is the default with gcc and
> gfortran if you have a platform that supports the 64-bit model.  I
> built with 4.1.1 on MacOS X 10.6.3 using the gcc and gfortran
> versions 4.4.1 from the gcc-leopard-intel-bin.tar.gz (Intel Mac)
> link on http://hpc.sourceforge.net/, but you should probably be
> using the 4.5 versions for your Intel Core 2 Duo, from the
> gcc-snwleo-intel-bin.tar.gz (Snow Leopard) link on the same web
> site.

But I was wrong about whether "-m64" is needed.  It turns out that you
need CFLAGS=-m64 and FFLAGS=-m64 for gcc and gfortran if the hdf5
library you will link with was built with CFLAGS=-m64.

So the following worked for me woth netCDF-4.1.1 on a MacOS X 10.6.3
platform in that case:

  CC=gcc FC=gfortran CXX='' CFLAGS=-m64 FFLAGS=-m64 \
  ./configure --with-hdf5=$HDFDIR --with-zlib=/usr/lib

--Russ




Russ Rew                                         UCAR Unidata Program
address@hidden                      http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: FOV-989930
Department: Support netCDF
Priority: Normal
Status: Closed