some help please

Ricardo Anguiano
Mon Mar 3 19:09:00 GMT 2003

etham <> 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:

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

Ricardo Anguiano

More information about the Gcc-help mailing list