This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
help :: cant run due to libstdc++
- To: <gcc-help at gcc dot gnu dot org>
- Subject: help :: cant run due to libstdc++
- From: "Umapathy S" <nsupathy at myrealbox dot com>
- Date: Thu, 1 Mar 2001 14:00:04 -0000
hi all
A trivial error but dont know how to solve it
I am trying to use gcc/g++ to compile a helloworld C++ program
Here is the program
Problem :
//hello.C prints "hello, world" to stdout
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
char str[]="hello, world";
cout << str << endl;
return 0;
} //end of main
The make file for the program is as follows
#makefile to compile hello.C program
CC=/usr/local/bin/g++
all:hello.o
${CC} -ohello hello.o
hello.o:hello.C
${CC} -c hello.C
clean:
rm -f hello.o hello
The compilation part is done well, but when I try to execute hello the
following error occurs
ld.so.1:hello: fatal: libstdc++.so.2.10.0: open failed: No such file or
directory
Killed
Platform :
using gnu gcc 2.95.2 19991024 (release) on Solaris 2.6
Reasons :
I checked out libstdc++.so.2.10.0, it is in
/usr/local/lib/libstdc++.so.2.10.0
I am not using linking options like -nodefaultlibs and -nostdlib
Thanks in advance for any help
cheers
Umapathy S