Operating System - Linux
1748250 Members
3466 Online
108760 Solutions
New Discussion юеВ

Re: Not able to create executable from c source file

 
sanjay singh_2
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
4 REPLIES 4
Dennis Handly
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?
Steven Schweda
Honored Contributor

Re: Not able to create executable from c source file

"-lnsl" or "-lrpcsoc" perhaps?

("man pmap_set", look for "-l".)
sanjay singh_2
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.
Steven Schweda
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.