This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: some help please
- From: Ricardo Anguiano <anguiano at codesourcery dot com>
- To: etham <etham at free dot fr>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 03 Mar 2003 11:08:52 -0800
- Subject: Re: some help please
- References: <8284E3E0-4D77-11D7-8477-000393111126@free.fr>
etham <etham at free dot fr> writes:
> Sir,
>
> I'm trying to compile some programs in C language in order to test rpc
> communication but I get one error
> could you help me please ?
>
> I wrote 3 files : modele.x, client .c and serveur.c and then compiled
> the first file with this line with no problem :
> rpcgen modele.x
>
> but when I try to compile the 2 others with this line I get one
> gcc modele_clnt.c modele_xdr.c CLIENT.c -o CLIENT -lnsl
> ld: can't locate file for: -lnsl
>
> it tells me there is an file missing and I checked that the first 2
> files have been already generated with the first command
> what kind of file can I add in this line please?
>
> where can I find some documentation about the extensions which can
> be used with gcc as -lnsl, -lm, .......... ?
-lNAME just tells the linker to resolve missing symbols in libNAME
libraries. The libraries are not bundled with GCC. For
documentation on the linker, see:
http://www.gnu.org/manual/ld-2.9.1/html_chapter/ld_toc.html
> I do these tests on Macintosh G4 + Mac OS X.2.4 + gcc
It sounds like you are missing libnsl or don't have it in your
LD_RUN_PATH. libnsl is usually packaged as part of glibc.
HTH,
--
Ricardo Anguiano
http://www.codesourcery.com