Operating System - HP-UX
1753725 Members
4489 Online
108799 Solutions
New Discussion юеВ

Unsatisfied symbol error during pgm link for getyx()

 
SOLVED
Go to solution
Travis Rebok
Advisor

Unsatisfied symbol error during pgm link for getyx()

My waive.c program includes the following curses info:

#include

WINDOW *planwin;
planwin= newwin(8,75,6,0);
getyx(planwin,y,x);

On compile/link I am getting the error message:
/usr/ccs/bin/ld: Unsatisfied symbols:
__getcury (first referenced in waivepgm.o) (code)
__getcurx (first referenced in waivepgm.o) (code)

I assume that __getcury and __getcurx are being called from within the getyx()curses function and they are not found. I assume that I am missing an HP lib in my makefile.

If this is the problem, how can I tell which lib these are in?

My makefile has the following:
CURSESLIB = -lHcurses -lcur_colr -lV3

My other screens that use Curses are compile/linking fine, but this is the only one that is calling the getyx() function

Any suggestions?
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Unsatisfied symbol error during pgm link for getyx()

I would drop the -lHcurses -lcur_colr and replace that pair with simply -lcurses. You should note that getyx() is actually a macro and that is why getyx(playwin,y,x) works rather than getyx(playwin,&y,&x) if getyx() were a real function.
If it ain't broke, I can fix that.
Travis Rebok
Advisor

Re: Unsatisfied symbol error during pgm link for getyx()

Worked like a charm and actually cleared up some other execution problems that I was having with some curses stuff.

Can you tell me what actually do the parameters on the CURSESLIB relate to? In other words is there a lib that -lcurses corresponds to?

Thanks.
A. Clay Stephenson
Acclaimed Contributor

Re: Unsatisfied symbol error during pgm link for getyx()

Rather than telling you, I'll let the box tell you:

ldd myexe

Man ldd (list dynamic dependencies) for details.
If it ain't broke, I can fix that.