How to link the following library under cygwin?
Christopher Faylor
cgf@redhat.com
Fri Dec 20 20:14:00 GMT 2002
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/
More information about the Cygwin
mailing list