Greg wrote:
Hi all. For starters, uname -a:
SunOS sol 5.10 Generic_137111-08 sun4u sparc SUNW,Sun-Fire-880
Something about my makefile and/or my environment is broken. When I compile
this program:
#include <iostream>
main(){std::cout << "Hello\n";}
with
g++ -O1 simple.cpp -o simple
then ldd -r simple:
libstdc++.so.6 => /opt/csw/lib/libstdc++.so.6
libm.so.2 => /usr/lib/libm.so.2
libgcc_s.so.1 => /opt/csw/lib/libgcc_s.so.1
libc.so.1 => /usr/lib/libc.so.1
libm.so.1 => /usr/lib/libm.so.1
symbol not found:
_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_i
(simple)
This unresolved symbol prevents the app from running. Any suggestions would be
welcome.
Don't use the blastwave versions of libstdc++
blinder:tmp $ uname -a
SunOS blinder 5.11 snv_123 i86pc i386 i86pc
blinder:tmp $ which g++
/usr/sfw/bin/g++
blinder:tmp $ cat simple.cpp
#include <iostream>
main()
{
std::cout << "Hello\n";
}
blinder:tmp $ g++ -O1 simple.cpp -o simple
blinder:tmp $ ldd simple
libstdc++.so.6 => /usr/sfw/lib/libstdc++.so.6
libm.so.2 => /lib/libm.so.2
libgcc_s.so.1 => /usr/sfw/lib/libgcc_s.so.1
libc.so.1 => /lib/libc.so.1
blinder:tmp $ ./simple
Hello
blinder:tmp $
James C. McPherson
--
Senior Kernel Software Engineer, Solaris
Sun Microsystems
http://blogs.sun.com/jmcp http://www.jmcp.homeunix.com/blog
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code