Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Help: ld: cannot find -l.... any library
Help: ld: cannot find -l.... any library [message #140700] Tue, 15 March 2005 07:07 Go to next message
Eclipse UserFriend
Originally posted by: krebs-dv.lisega.de

Hello out there,

i would like some help on following problem:

Using eclipse / cygwin configuration (gcc, make, ld..) i get following
message when trying to include any library (test with libc (cygwin):

Building target: AO_CW.exe
gcc -o AO_CW.exe ao_cw.o errw.o findw.o pcidataw.o -llibc.a
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cy gwin/bin/ld:
cannot find -llibc.a
collect2: ld returned 1 exit status

Library and path (not in example) are set in project properties, C/C++
Build, GCC/CLinker Libraries/Library search path.

After trying different combinations on that i still get the above message.

Thank's for any help!

Regards

Uli
Re: Help: ld: cannot find -l.... any library [message #140737 is a reply to message #140700] Tue, 15 March 2005 07:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: grkoma.gmail.com

Hello Uli,

Try -llibc instead of -llibc.a ....
It is enough to set name of the library without extension in project
libraries dialog.

Marko


Uli wrote:
> Hello out there,
>
> i would like some help on following problem:
>
> Using eclipse / cygwin configuration (gcc, make, ld..) i get following
> message when trying to include any library (test with libc (cygwin):
>
> Building target: AO_CW.exe
> gcc -o AO_CW.exe ao_cw.o errw.o findw.o pcidataw.o -llibc.a
> /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cy gwin/bin/ld:
> cannot find -llibc.a
> collect2: ld returned 1 exit status
>
> Library and path (not in example) are set in project properties, C/C++
> Build, GCC/CLinker Libraries/Library search path.
>
> After trying different combinations on that i still get the above message.
>
> Thank's for any help!
>
> Regards
>
> Uli
>
>
>
Re: Help: ld: cannot find -l.... any library [message #140755 is a reply to message #140737] Tue, 15 March 2005 08:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: krebs-dv.lisega.de

Thank's Marko; i tried that already; finally i have to link a library with
the extension .lib (pci_win.lib).

Uli

Marko Nikolic wrote:

> Hello Uli,

> Try -llibc instead of -llibc.a ....
> It is enough to set name of the library without extension in project
> libraries dialog.

> Marko


> Uli wrote:
>> Hello out there,
>>
>> i would like some help on following problem:
>>
>> Using eclipse / cygwin configuration (gcc, make, ld..) i get following
>> message when trying to include any library (test with libc (cygwin):
>>
>> Building target: AO_CW.exe
>> gcc -o AO_CW.exe ao_cw.o errw.o findw.o pcidataw.o -llibc.a
>> /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cy gwin/bin/ld:
>> cannot find -llibc.a
>> collect2: ld returned 1 exit status
>>
>> Library and path (not in example) are set in project properties, C/C++
>> Build, GCC/CLinker Libraries/Library search path.
>>
>> After trying different combinations on that i still get the above message.
>>
>> Thank's for any help!
>>
>> Regards
>>
>> Uli
>>
>>
>>
Re: Help: ld: cannot find -l.... any library [message #140845 is a reply to message #140755] Tue, 15 March 2005 20:22 Go to previous messageGo to next message
Javier Kohen is currently offline Javier KohenFriend
Messages: 35
Registered: July 2009
Member
Hi Uli,

El mar, 15-03-2005 a las 08:20 +0000, Uli escribió:
> Thank's Marko; i tried that already; finally i have to link a library with
> the extension .lib (pci_win.lib).

-llibc will try to link a library by the name liblibc.so, liblibc.dll,
liblibc.a, etc, depending on your platform and link settings. If you
need to link against libc just use -lc (though the compiler should link
against libc by default). If your library doesn't follow the lib* naming
convention you'll have to use the full name as you did, but I'm not sure
that there are no side effects in doing that.

--
Javier Kohen <jkohen@users.sourceforge.net>
ICQ: blashyrkh #2361802
Jabber: jkohen@jabber.org
Re: Help: ld: cannot find -l.... any library [message #140963 is a reply to message #140845] Wed, 16 March 2005 09:41 Go to previous message
Eclipse UserFriend
Originally posted by: krebs-dv.lisega.de

Javier Kohen wrote:

> Hi Uli,

> El mar, 15-03-2005 a las 08:20 +0000, Uli escribió:
>> Thank's Marko; i tried that already; finally i have to link a library with
>> the extension .lib (pci_win.lib).

> -llibc will try to link a library by the name liblibc.so, liblibc.dll,
> liblibc.a, etc, depending on your platform and link settings. If you
> need to link against libc just use -lc (though the compiler should link
> against libc by default). If your library doesn't follow the lib* naming
> convention you'll have to use the full name as you did, but I'm not sure
> that there are no side effects in doing that.

Hi Javier,

it's easy, after you know it; eclipse does not like extensions; without an
extension it worked.

Thank's a lot

Uli
Previous Topic:Remote debug against simulator -- no 'load'?
Next Topic:Configuration - CDT and Cygwin
Goto Forum:
  


Current Time: Fri Mar 29 00:02:01 GMT 2024

Powered by FUDForum. Page generated in 0.05004 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top