help :: cant run due to libstdc++

Umapathy S
Wed Feb 28 23:25:00 GMT 2001

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} -ohello hello.o

        ${CC} -c hello.C

        rm -f hello.o hello

    The compilation part is done well, but when I try to execute hello the
following error occurs fatal: open failed: No such file or

    Platform :
        using gnu gcc  2.95.2 19991024 (release) on Solaris  2.6

    Reasons :
        I checked out, it is in
        I am not using linking options like -nodefaultlibs and -nostdlib

    Thanks in advance for any help

Umapathy S

More information about the Gcc-help mailing list