public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: help :: cant run due to libstdc++
@ 2001-03-01  7:36 David Korn
  2001-03-01 20:39 ` Umapathy S
  0 siblings, 1 reply; 9+ messages in thread
From: David Korn @ 2001-03-01  7:36 UTC (permalink / raw)
  To: 'Umapathy S', Anthony Lee; +Cc: gcc-help

>-----Original Message-----
>From: Umapathy S [ mailto:nsupathy@myrealbox.com ]
>Sent: 01 March 2001 17:13

>I tried to link forcibly as
>    /usr/local/bin/g++ -ohello hello.o 
>-l/usr/local/lib/libstdc++.a.2.10.0
>
>I got the list of errors as follows
>    ld: fatal: library -l/usr/local/lib/libstdc++.a.2.10.0: not found
>(!!!!but it is there and not corrupted)
>    ld: fatal: File processing errors. No output written to hello
>    collect2: ld returned 1 exit status

  Check the file permissions for it: is it not readable by you perhaps?

>>     ld.so.1:hello: fatal: libstdc++.so.2.10.0: open failed: No such
>> file or directory

  This is an error message from the dynamic linker.  Your copy of gcc has
a dynamic link library for libstdc++, and it is not the 'ld' linker that
is failing and complaining, but the 'ld.so' dynamic (run-time) linker.
Note that libstdc++.so.2.10.0 is not the same as libstdc++.a.2.10.0

  Try using

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib

to add /usr/local/lib to the places searched by the dynamic linker.

  These are just suggestions: let us know if they work or not.

       DaveK
-- 
 All your base are belong to us!


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

^ permalink raw reply	[flat|nested] 9+ messages in thread
* help :: cant run due to libstdc++
@ 2001-02-28 23:25 Umapathy S
  2001-02-28 23:32 ` Anthony Lee
  0 siblings, 1 reply; 9+ messages in thread
From: Umapathy S @ 2001-02-28 23:25 UTC (permalink / raw)
  To: gcc-help

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



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

end of thread, other threads:[~2001-03-01 21:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-01  7:36 help :: cant run due to libstdc++ David Korn
2001-03-01 20:39 ` Umapathy S
2001-03-01 20:46   ` Alexandre Oliva
2001-03-01 21:00     ` Umapathy S
2001-03-01 21:54       ` Alexandre Oliva
2001-03-01 21:59       ` Umapathy S
  -- strict thread matches above, loose matches on Subject: below --
2001-02-28 23:25 Umapathy S
2001-02-28 23:32 ` Anthony Lee
2001-03-01  2:38   ` Umapathy S

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