public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* shared libraries version
@ 2004-05-03 16:09 BeefStu BeefStu
  2004-05-04  3:04 ` llewelly
  0 siblings, 1 reply; 2+ messages in thread
From: BeefStu BeefStu @ 2004-05-03 16:09 UTC (permalink / raw)
  To: gcc-help


I have sample c++ program, which I am compiling (see steps below) onSolaris 
2.8, which uses the following version of g++.

/usr/local/bin/GNU/bin/g++ -c ./test.cpp -o test.o
/usr/local/bin/GNU/bin/g++ -g test.o -o test


/usr/local/bin/GNU/bin/g++ -v
Reading specs from 
/usr/local/bin/GNU/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/specs
Configured with: /db_backups/gcc/srcdir/gcc-3.3.2/configure 
--prefix=/usr/local/
bin/GNU --disable-nls --enable-threads=posix --enable-languages=c,c++ 
--with-sys
tem-zlib
Thread model: posix
gcc version 3.3.2

An ldd on the executable repors that it needs verion 5 of libstdc++.so.

ldd ./test
         libstdc++.so.5 =>               
/usr/local/bin/GNU/lib/libstdc++.so.5
         libm.so.1 =>                    /usr/lib/libm.so.1
         libgcc_s.so.1 =>                
/usr/local/bin/GNU/lib/libgcc_s.so.1
         libc.so.1 =>                    /usr/lib/libc.so.1
         libdl.so.1 =>                   /usr/lib/libdl.so.1
         /usr/platform/SUNW,Ultra-Enterprise/lib/libc_psr.so.1


Why is g++ referencing a specific version of a library instead of a generic 
name? I would have hope do seen libstdc++.so as the requirement.

This way if there was a bug in libstdc++.so.5, version libstdc++.so.6 can be 
installed, re-named to libstdc++.so and this would not require me to
re-build my executables.

>Can you tell g++ to use libstdc++.so instead of libstdc++.so.5
>
>Thanks in advance to all who answer

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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

end of thread, other threads:[~2004-05-04  3:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-03 16:09 shared libraries version BeefStu BeefStu
2004-05-04  3:04 ` llewelly

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