Re: [netcdfgroup] does anyone mind if the fortran 77 library always gets its own file, instead of being combined with the C library?

  • To: netcdfgroup@xxxxxxxxxxxxxxxx
  • Subject: Re: [netcdfgroup] does anyone mind if the fortran 77 library always gets its own file, instead of being combined with the C library?
  • From: Magnus Hagdorn <Magnus.Hagdorn@xxxxxxxx>
  • Date: Tue, 29 Mar 2011 09:28:18 +0100
Ed Hartnett wrote:
Howdy netCDFians!

In the old days the netCDF F77 library was built into the netCDF C
library. (This seemed natural, because it was really just a bunch of C
functions anyway.) Fortran programs using the F77 API, and C programs
linked with -lnetcdf.

This idea does not work with shared libraries, so when shared libraries
are built (now the default) a separate F77 library is built. Now C
library users still link with -lnetcdf, but F77 library users must use
-lnetcdff -lnetcdf. (Note the extra "f" at the end of the F77 library
name.)

Maintaining the ability to combine the C and F77 library is expensive in
terms of programmer time. Will anyone object if I remove this option?

Users will see no impact on their code. They will have to add
"-lnetcdff" to their Makefiles for F77 programs. (This is already true
for shared library builds.)

Any comment or feedback welcome...



Hi Ed,
does that mean you cannot have mixed C/Fortran code where both languages access a netCDF library? I don't have such a beast, but I am curious. Also, this might affect mixed python/fortran codes.
Cheers
magnus

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



  • 2011 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: