This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Can gFortran Link Against Cygwin netCDF 4.3.1.1 Library?
- From: Marco Atzeri <marco dot atzeri at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 24 Nov 2014 22:59:34 +0100
- Subject: Re: Can gFortran Link Against Cygwin netCDF 4.3.1.1 Library?
- Authentication-results: sourceware.org; auth=none
- References: <CAGeTGVhs4uQQdzKe+bi6AvNYFQrVa5ZPWPbzg4=nUDMBju+DFA at mail dot gmail dot com>
On 11/24/2014 10:28 PM, John Kim wrote:
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
Questions:
1) C API or Fortran API for NetCDF ?
2) Have you installed libnetcdf-devel package and
libnetcdf-fortran-devel ?
3) why -L"/cygdrive/c/Program Files (x86)/netCDF 4.3.1.1/lib" ?
The latest cygwin libnetcdf-devel package is 4.3.2-2
and its library is:
$ cygcheck -l libnetcdf-devel |grep dll
/usr/lib/libnetcdf.dll.a
Regards
Marco
--
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