From: "Venkatakrishnan, V" <V.Venkatakrishnan@channels.usa.xerox.com>
To: "'John Love-Jensen'" <eljay@adobe.com>, gcc-help@gcc.gnu.org
Subject: RE: A simple problem regarding shared libs...
Date: Fri, 08 Feb 2002 10:20:00 -0000 [thread overview]
Message-ID: <8229C4577A00D511ABC00090277A45A0ADBA0E@us0111-ch-ms1.channels.mc.xerox.com> (raw)
Hi Eljay,
Hmmmm, I did echo $LD_LIBRARY_PATH and I didn't get anything (just
got my # prompt back) and then did set LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH,
did echo again and didn't get anything, could it mean that my variable is
not set?
I tried gcc hello.o -L. -lshared -o Hello again after that but got
the same error message.
Regards,
Venky
-----Original Message-----
From: John Love-Jensen [mailto:eljay@adobe.com]
Sent: Friday, February 08, 2002 12:49 PM
To: Venkatakrishnan, V; gcc-help@gcc.gnu.org
Subject: Re: A simple problem regarding shared libs...
Hi V,
Have you set your LD_LIBRARY_PATH?
LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
Sincerely,
--Eljay
Hi,
I've these two files.....
Hello.c
#include <stdio.h>
Extern const char* func();
Int main( void)
{
printf("Hello World");
func()
return 1;
}
Shrobj.c
Const char* func(void)
{
printf("Hello from shared lib");
}
I do the following to create the obj files..
Gcc -c hello.c
Gcc -c shrobj.c
and then to create the shared lib I do
Gcc shrobj.o -shared -o libshared.so
this gives me the shared lib.
Now I try to compile my program hello.o with this shared lib by
saying Gcc hello.o -L. -lshared -o Hello
but this gives me an error saying.....
Ld: 0706-006 Cannot find or open library file: -l shared
ld:open(): A file or directory in the path name does not exist.
Collect2: ld returned 255 exit status
Why is this happening? My shared lib. Is right there and I've also
given -L. to look for it in the current directory.
Any help please.
Regards,
next reply other threads:[~2002-02-08 18:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-08 10:20 Venkatakrishnan, V [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-02-11 9:38 Venkatakrishnan, V
[not found] <8229C4577A00D511ABC00090277A45A0ADBA0D@us0111-ch-ms1.chann els.mc.xerox.com>
2002-02-08 18:49 ` Andrea 'Fyre Wyzard' Bocci
2002-02-08 10:38 Venkatakrishnan, V
2002-02-08 9:30 Venkatakrishnan, V
2002-02-08 9:58 ` John Love-Jensen
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=8229C4577A00D511ABC00090277A45A0ADBA0E@us0111-ch-ms1.channels.mc.xerox.com \
--to=v.venkatakrishnan@channels.usa.xerox.com \
--cc=eljay@adobe.com \
--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).