This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: B19: Link error between libs linked with -l
- To: Adam Chlipala <psion at tpu dot org>
- Subject: Re: B19: Link error between libs linked with -l
- From: Mumit Khan <khan at xraylith dot wisc dot edu>
- Date: Sun, 27 Sep 1998 18:36:39 -0500 (CDT)
- Cc: gnu-win32 at cygnus dot com
On Sun, 27 Sep 1998, Adam Chlipala wrote:
> When I do something like the following:
> gcc file.c -l1 -l2
> I get linker errors involving functions found in 1 and used in 2. When
> I move a lib to the cwd and do:
> gcc file.c lib1.a -l2
> all is well. Am I doing something incorrectly here or is this a bug?
When you use -l<libname>, you must also supply a -L<dirname> to tell
the linker where to find it (unless it's in one of the standard or
default directories).
$ gcc file.c -L. -l1 -l2
will fix your problem.
Mumit
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".