Occasional Contributor
Not able to create executable from c source file
Hi All,

I am facing following problem when i am trying to create executable from c source file.
gcc -o pmapctl pmapctl.c
/usr/ccs/bin/ld: Unsatisfied symbols:
pmap_unset (first referenced in /var/tmp//cc6tBFf0.o) (code)
pmap_set (first referenced in /var/tmp//cc6tBFf0.o) (code)
collect2: ld returned 1 exit status

Machine Configuration: HPUX 11.23 Parisc
The C source file is creating RPC connection through the TCP protocol
Acclaimed Contributor Acclaimed Contributor
Re: Not able to create executable from c source file
(I've asked the moderators to move this to HP-UX > Languages.)
Where do you expect these functions to be defined?
Honored Contributor Honored Contributor
Re: Not able to create executable from c source file
"-lnsl" or "-lrpcsoc" perhaps?

("man pmap_set", look for "-l".)
Occasional Contributor
Re: Not able to create executable from c source file
Thank a lot Steven,

I ran the following command and it works.
gcc -o pmapctl pmapctl.c -lnsl.
Honored Contributor Honored Contributor
Re: Not able to create executable from c source file
> I ran the following command and it works.

That's good news, but, of course, that's not
the same as, "The program works." The "man"
page describes the difference between the two
libraries. I can't tell which one would do
what you want.