public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* libstdc++ linked as libstdc++.a
@ 2002-11-12 17:04 Mike Bezman
  2002-11-13  1:50 ` bjorn rohde jensen
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Bezman @ 2002-11-12 17:04 UTC (permalink / raw)
  To: gcc-help; +Cc: libstdc++

Hi !!
I am trying to build an C++/C executable using gcc3.2 on RedHat
7.2("Intel").
I don't want the users on the other machines to be required to have
libstdc++.so on those machines.

For example with simple app hello.cpp
the commmand I tried : gcc -o hello -lstdc++ hello.cpp and when running on
different computer (which doesn't have libstdc++) I am getting - error while
loading shared libraries libstdc++.so.5 ....

How to solve this problem (i.e. I guess force the app. to link libstdc++.a
instead) ?

Thanks, Mike




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

* Re: libstdc++ linked as libstdc++.a
  2002-11-12 17:04 libstdc++ linked as libstdc++.a Mike Bezman
@ 2002-11-13  1:50 ` bjorn rohde jensen
  0 siblings, 0 replies; 2+ messages in thread
From: bjorn rohde jensen @ 2002-11-13  1:50 UTC (permalink / raw)
  To: Mike Bezman; +Cc: gcc-help

Hi,

  Right, you do have to link statically to libs,
you dont want to require be installed on target
hosts. One way to do that is to tell g++ not to
link with standard libs and handle that yourself
explicitly, which enables you to choose individual
libs to link with dynamically or statically.
  You might need to get g++ to tell you, which
supporting libs need to be linked in, using the -v
option during an ordinary linking of your program.

Yours sincerely,

Bjorn

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

end of thread, other threads:[~2002-11-13  9:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-12 17:04 libstdc++ linked as libstdc++.a Mike Bezman
2002-11-13  1:50 ` bjorn rohde jensen

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 read-only IMAP folder(s) and NNTP newsgroup(s).