Problems linking in libstdc++-2.90.5
Michael Bletzinger
michael.bletzinger@ssa.crane.navy.mil
Thu Jul 15 11:25:00 GMT 1999
Hello,
My hello world program for testing my fresh installed libstdc++-2.90.5
library is core dumping.
Here is my setup:
SunOS ultra2a 5.6 Generic_105181-12 sun4u sparc
I am using the egcs-19990629 which I assume is not egcs 1.1.2
I compiled using --enabled-shared but not with the recommended
-fstrict-aliasing -ansi -fnew-abi -fhonor-std flags because I do not
know how to set them in the egcs build. I did try them for Hello World
but they did not change anything other than needing to use std:: for
cout.
The snapshot is located in /opt/egcs_snap. I was able to compile and
run Hello World with it.
2.90.5 is located in /opt/libstdc++-2.90.5
Hello World listing:
#include<iostream>
main()
{
cout<<"Hello World"<<endl;
}
Compile and link commands:
/opt/egcs_snap/bin/g++ -g -c -I
/opt/libstdc++-2.90.5/include/g++-v3/ext/ -I
/opt/libstdc++-2.90.5/include/g++-v3/backward/ -I
/opt/libstdc++-2.90.5/include/g++-v3/ -fno-implicit-templates -DC_PLUS
testcc.C
/opt/egcs_snap/bin/g++ -g -fno-implicit-templates -DC_PLUS testcc.o
-L/opt/libstdc++-2.90.5/lib/ -lstdc++
ldd of Hello World:
BASH$ ldd a.out
libstdc++.so.3 =>
/opt/libstdc++-2.90.5/lib/libstdc++.so.3
libm.so.1 => /usr/lib/libm.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
Back Trace of Hello world:
#0 ios_base::_M_rdstate (this=0x0) at
/opt/libstdc++-2.90.5/include/g++-v3/bits/ios_base.h:252
#1 0x19ad8 in basic_ios<char, char_traits<char> >::rdstate (this=0x0)
at /opt/libstdc++-2.90.5/include/g++-v3/bits/basic_ios.h:63
#2 0x19b00 in basic_ios<char, char_traits<char> >::good (this=0x0) at
/opt/libstdc++-2.90.5/include/g++-v3/bits/basic_ios.h:80
#3 0x19920 in basic_ostream<char, char_traits<char> >::sentry::sentry
(this=0xeffff628, __os=@0x2c410)
at /opt/libstdc++-2.90.5/include/g++-v3/bits/std_ostream.h:241
#4 0xef6b97b4 in basic_ostream<char, char_traits<char> > &
operator<<<char_traits<char> > (__out=@0x2c410, __s=0x1a440 "Hello
World")
at ../../libstdc++-2.90.5/bits/std_ostream.h:425
#5 0x150f4 in main () at testcc.C:5
I was unable to get a repository copy of egcs or libstdc++ because my
anonymous login was denied.
Any suggestions would be appreciated.
Thanks
Michael
--
First Rule of Engineering Design:
It is wiser to present an unworkable design rather
than a workable design to speed up the revision process
Phone (voice): (812)854-1101 (fax): (812)854-3437
More information about the Libstdc++
mailing list