This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: some help please


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]