Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

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