Re: Not able to create executable from c source file (123 Views)
Reply
Occasional Contributor
sanjay singh_2
Posts: 3
Registered: ‎04-03-2008
Message 1 of 5 (123 Views)

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
Dennis Handly
Posts: 25,190
Registered: ‎03-06-2006
Message 2 of 5 (123 Views)

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
Steven Schweda
Posts: 9,091
Registered: ‎02-23-2005
Message 3 of 5 (123 Views)

Re: Not able to create executable from c source file

"-lnsl" or "-lrpcsoc" perhaps?

("man pmap_set", look for "-l".)
Occasional Contributor
sanjay singh_2
Posts: 3
Registered: ‎04-03-2008
Message 4 of 5 (123 Views)

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
Steven Schweda
Posts: 9,091
Registered: ‎02-23-2005
Message 5 of 5 (123 Views)

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.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.