Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Where did ":" come from ?(linking library )
Where did ":" come from ? [message #1847292] Thu, 21 October 2021 22:31 Go to next message
Anne Ranch is currently offline Anne RanchFriend
Messages: 57
Registered: October 2020
Member
To link to libbluetooth.a library I have to add ": " to option.
Why?


Invoking: GCC C++ Linker
g++ -L/usr/lib/x86_64-linux-gnu -v -o "TEST_BT" ./src/TEST_BT.o -l:libbluetooth.a
Re: Where did ":" come from ? [message #1847298 is a reply to message #1847292] Fri, 22 October 2021 06:39 Go to previous messageGo to next message
David VavraFriend
Messages: 1430
Registered: October 2012
Senior Member
Learn the linker options
https://gcc.gnu.org/onlinedocs/gcc-11.2.0/gcc/Link-Options.html
scroll down to "-llibrary"

From the man page for ld:
-l namespec
If namespec is of the form :filename, ld will search the library path for a file called 
filename, otherwise   it will search the library path for a file called libnamespec.a


Full doumentation for linker (ld-2.37)
https://sourceware.org/binutils/docs/ld/

[Updated on: Fri, 22 October 2021 07:47]

Report message to a moderator

Re: Where did ":" come from ? [message #1847347 is a reply to message #1847298] Sun, 24 October 2021 13:20 Go to previous message
apollos dada is currently offline apollos dadaFriend
Messages: 5
Registered: April 2021
Junior Member
Hi, thanks for sharing the link
Previous Topic:Issues to build a project
Next Topic:How to calibrate a simulation without teleports
Goto Forum:
  


Current Time: Sat Dec 03 03:53:06 GMT 2022

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

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

Back to the top