Skip to contentSkip to conversation

linking to libstdc++

DISCUSSION ameer armaly 3 participants 4 messages Apr 8, 2004 – Apr 9, 2004

lore
Share & tools
lore
#0 lore raw

Hi all.
What is the ld option to link to the c++ library? like -lc is to link to the c library.

#1 lore raw
Quoted 2 lines · ameer armaly

What is the ld option to link to the c++ library? like -lc is to link to the c library.

	-lstdc++

In general, the switch -lfoo will link against libfoo.so or libfoo.a.

However, if you invoke the linker via g++, -lstdc++ is added automatically.

Signature · 1 line
Glynn Clements <[email protected]>
#3 lore raw
In reply to ameer armaly

On Thu, 2004-04-08 16:05:22 -0400, ameer armaly <[email protected]> wrote in message <Pine.LNX.4.58.0404081604520.518@debian>:

Quoted 3 lines

Hi all.
What is the ld option to link to the c++ library? like -lc is to link to the c library.

Just use g++ as a ld frontend instead?

MfG, JBG

Signature · 4 lines
   Jan-Benedict Glaw       [email protected]    . +49-172-7608481
   "Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg
    fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!
   ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
#2 lore raw
In reply to Glynn Clements

Thanks all. It seems I was missing something, since I tried it and it didn't work. I just did a fresh install of gcc, though, and it took care of everything; thanks again.