linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linking to libstdc++
@ 2004-04-08 20:05 ameer armaly
  2004-04-08 21:44 ` Glynn Clements
  2004-04-08 22:47 ` Jan-Benedict Glaw
  0 siblings, 2 replies; 4+ messages in thread
From: ameer armaly @ 2004-04-08 20:05 UTC (permalink / raw)
  To: linux-c-programming

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linking to libstdc++
  2004-04-08 20:05 linking to libstdc++ ameer armaly
@ 2004-04-08 21:44 ` Glynn Clements
  2004-04-09  1:54   ` ameer armaly
  2004-04-08 22:47 ` Jan-Benedict Glaw
  1 sibling, 1 reply; 4+ messages in thread
From: Glynn Clements @ 2004-04-08 21:44 UTC (permalink / raw)
  To: ameer armaly; +Cc: linux-c-programming


ameer armaly wrote:

> 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.

-- 
Glynn Clements <glynn.clements@virgin.net>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linking to libstdc++
  2004-04-08 20:05 linking to libstdc++ ameer armaly
  2004-04-08 21:44 ` Glynn Clements
@ 2004-04-08 22:47 ` Jan-Benedict Glaw
  1 sibling, 0 replies; 4+ messages in thread
From: Jan-Benedict Glaw @ 2004-04-08 22:47 UTC (permalink / raw)
  To: linux-c-programming

[-- Attachment #1: Type: text/plain, Size: 597 bytes --]

On Thu, 2004-04-08 16:05:22 -0400, ameer armaly <ameer@charter.net>
wrote in message <Pine.LNX.4.58.0404081604520.518@debian>:
> 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

-- 
   Jan-Benedict Glaw       jbglaw@lug-owl.de    . +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));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: linking to libstdc++
  2004-04-08 21:44 ` Glynn Clements
@ 2004-04-09  1:54   ` ameer armaly
  0 siblings, 0 replies; 4+ messages in thread
From: ameer armaly @ 2004-04-09  1:54 UTC (permalink / raw)
  To: Glynn Clements; +Cc: linux-c-programming

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-04-09  1:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-08 20:05 linking to libstdc++ ameer armaly
2004-04-08 21:44 ` Glynn Clements
2004-04-09  1:54   ` ameer armaly
2004-04-08 22:47 ` Jan-Benedict Glaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).