delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/20/19:50:50

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Mime-Version: 1.0
Date: Fri, 20 Dec 2002 15:00:13 -0800 (PST)
From: Elfyn McBratney <elfyn-cygwin AT sickpuppy DOT co DOT uk>
To: Zhaosong Lu <zhaosong AT isye DOT gatech DOT edu>, cygwin AT cygwin DOT com
Subject: Re: How to link the following library under Cygwin?
Reply-To: cygwin AT cygwin DOT com
X-Originating-Ip: [195.92.67.70]
Message-Id: <20021220230013.A84AD3B98@sitemail.everyone.net>

Try this:

  $ gcc -o test -L. libmetis.a initialize.c

You need to include the static archive into your image. I'm pretty sure the -l{} only applies to shared libraries.

Elfyn
elfyn AT exposure DOT org DOT uk


--- Zhaosong Lu <zhaosong AT isye DOT gatech DOT edu> wrote:
>Dear all,
>
>I dowload one graph partition package called "metis" and build it into
>"libmetis.a".   
>Then I write one file "initialize.c" which calls one function
>'METIS_NodeND' inside from the package "metis". After compilation  and
>linking them under Cygwin/xFree86 as follows:
>
>gcc -o test initialize.c -L. -lmetis   
>
>gives the following information:
>
>initialize.o(.text+0x4b8):initialize.c: undefined reference to '_METIS_NodeND' 
>collect2: ld returned 1 exit status.
>
>AS we know, it is fine under Linux. Would you like to tell me how to
>compile the library "libmetis.a" and my "initialize.c" under Cygwin/XFree86? 
>
>Your help will be highly appreciated.
>
>Sincerely,
>
>
>Zhaosong 
>----------------------------------------------
>Zhaosong Lu
>School of Industrial and Systems Engineering
>Georgia Institute of Technology 30332
>Tel:1-404-873-1929(H) 1-404-894-4318(O)
>----------------------------------------------  
>
>
>--
>Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>Bug reporting:         http://cygwin.com/bugs.html
>Documentation:         http://cygwin.com/docs.html
>FAQ:                   http://cygwin.com/faq/

_____________________________________________________________
www.smokeJet.com - Free UK Internet Services

_____________________________________________________________
Select your own custom email address for FREE! Get you AT yourchoice DOT com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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