This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Can gFortran Link Against Cygwin netCDF 4.3.1.1 Library?
- From: John Kim <jbkim at dgvm dot us>
- To: cygwin at cygwin dot com
- Date: Mon, 24 Nov 2014 13:28:57 -0800
- Subject: Can gFortran Link Against Cygwin netCDF 4.3.1.1 Library?
- Authentication-results: sourceware.org; auth=none
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