delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/20/21:59:14

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
Date: Fri, 20 Dec 2002 19:54:06 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: How to link the following library under cygwin?
Message-ID: <20021221005406.GA15873@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20021220230013 DOT A84AD3B98 AT sitemail DOT everyone DOT net>
Mime-Version: 1.0
In-Reply-To: <20021220230013.A84AD3B98@sitemail.everyone.net>
User-Agent: Mutt/1.5.1i

On Fri, Dec 20, 2002 at 03:00:13PM -0800, Elfyn McBratney wrote:
>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.

Close.

	gcc -o test initialize.c libmetis.a

The .a file goes last and you don't need -L.

cgf

--
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