delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/11/24/17:00:04

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=c8vSVESBdozvIidJbKX5SO4zYJOdvAuNQ77cQddzidJ
anKiw5twewsrzuteEqv1t0QZ9Panei+SmBv/5kmVmw5JRUMmmN1Ag9PVbqzdiZnl
HqHx8i/Gc7SbXH478EIX38hBWbZ8mNN3q3PYS70gnawqw2TL/CXyioVbBv2UmlpM
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=IAS+9oGiBF+mY2GzvLUDANEg//s=; b=HdADOfcDNRmSksWrL
iFKCCDBLWupePHA43u31QWcs54SK/4RPS0U8fVfGBqFcJPNhYJ8gN8YcCMk/OVLs
DAb2E7PHnehb5ObOlVQUBdSnW4R7kmk6dwlKnQdEsLGVOo5SsV8O203Qql6yqRec
vwp8cMfC8kGb6qr/9NFSTwGMbo=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-wi0-f173.google.com
X-Received: by 10.194.94.132 with SMTP id dc4mr39229218wjb.56.1416866384534; Mon, 24 Nov 2014 13:59:44 -0800 (PST)
Message-ID: <5473AA46.6040804@gmail.com>
Date: Mon, 24 Nov 2014 22:59:34 +0100
From: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Can gFortran Link Against Cygwin netCDF 4.3.1.1 Library?
References: <CAGeTGVhs4uQQdzKe+bi6AvNYFQrVa5ZPWPbzg4=nUDMBju+DFA AT mail DOT gmail DOT com>
In-Reply-To: <CAGeTGVhs4uQQdzKe+bi6AvNYFQrVa5ZPWPbzg4=nUDMBju+DFA@mail.gmail.com>
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019