From: "Umapathy S" <nsupathy@myrealbox.com>
To: "Anthony Lee" <al012@energex.com.au>
Cc: <gcc-help@gcc.gnu.org>
Subject: Re: help :: cant run due to libstdc++
Date: Thu, 01 Mar 2001 02:38:00 -0000 [thread overview]
Message-ID: <00f301c0a272$e265fcc0$af64c8c8@blr.thbs.com> (raw)
In-Reply-To: <3A9DFA15.185CD50E@energex.com.au>
thanks for the info Lee
But I thought that g++ will take care of C++ library linker options
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
thanks for any ideas
cheers
Umapathy S
----- Original Message -----
From: "Anthony Lee" <al012@energex.com.au>
To: "Umapathy S" <nsupathy@myrealbox.com>
Cc: <gcc-help@gcc.gnu.org>
Sent: Thursday, March 01, 2001 7:28 AM
Subject: Re: help :: cant run due to libstdc++
> I am not sure about Solaris but I would have thought there must be
> some environment variable pointing to where your lib is.
> You could try
>
> env | more
>
> to see if anything looks like what you are looking for and see
> if it is set correctly.
>
> Umapathy S wrote:
> >
> > 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
>
> --
> Anthony Lee
> Energex
> 150 Charlotte Street ..-- __o
> Brisbane ....-- _ \<,_
> Qld 4000 ____ (_)/ (_)
> Australia
> voice:+61 7 3407 4541
> fax: +61 7 3407 4607
> email: AL012@energex.com.au
>
>
> --------------------------------------------------------------------------
---------------------------------------------------------------------------
> This email message (and any accompanying file attachments) may contain
confidential or
> privileged information and is intended for the sole use of the addressee
named above. If you
> are not the intended recipient, or the person responsible for delivering
this message to the
> intended recipient, please notify ENERGEX immediately and destroy any
copies of the original
> message.
>
> Any unauthorised review, use, alteration, disclosure or distribution of
this email (including any
> attachments) by an unintended recipient is prohibited.
>
> ENERGEX accepts no responsibility for the content of any email which is
sent by an employee
> which is of a personal nature.
>
next prev parent reply other threads:[~2001-03-01 2:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-28 23:25 Umapathy S
2001-02-28 23:32 ` Anthony Lee
2001-03-01 2:38 ` Umapathy S [this message]
2001-03-01 7:36 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00f301c0a272$e265fcc0$af64c8c8@blr.thbs.com' \
--to=nsupathy@myrealbox.com \
--cc=al012@energex.com.au \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).