This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Can gFortran Link Against Cygwin netCDF 4.3.1.1 Library?


Hi,

I have a C program that uses a custom Fortran library and the netCDF
API. I'm trying to link the C and Fortran object files with the Cygwin
netCDF 4.3.1.1. library, like this:

   gfortran *.o libfortran.a -L"/cygdrive/c/Program Files (x86)/netCDF
4.3.1.1/lib" -lnetcdf

But it says "undefined reference" to all the netcdf API functions. The
netCDF installation I have is from the Cygwin Setup.exe installer. Do
I need to compile the netCDF source in a special way to make it
visible to the gfortran linker? Compiling netCDF is a major task so I
thought I'd ask before I give that a try....

Thanks,

-John

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]