This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Hello, I have installed the netcdf4.1.2. Everything seems to have gone fine, > but I get the error undefined reference when I make my program. > > My configure statement is: > ./configure prefix=/usr/local/netcdf FC=gfortran > > I have attached the output from configure, make, make check, and make > install. I have also attached the output form my makefile and the Fortran I > am trying to compile. > > Any help you can give would be appreciated. > > Larry Gardner > > Howdy Larry! I'm happy to say that your netcdf build and check worked just fine. Looking at your makefile output I see that your problem is actually with one of the other libraries you are using, which (confusingly) has a source file named netcdf.f. But the problem can probably be solved by moving your -lnetcdf to the far right of the link command, so that this other library can also find it. Good luck, Ed Ticket Details =================== Ticket ID: PSA-701162 Department: Support netCDF Priority: Normal Status: Closed