compile xev on HPUX 10.20 - errors

Hello,

i compiled the program xev under HPUX 10.20 and there are a lot of errors like this. Can anybody help me to fix this errors?

make xev
cc -O xev.c -o xev
/usr/ccs/bin/ld: Unsatisfied symbols:
XFree (code)
XKeysymToString (code)
XSelectInput (code)
XOpenDisplay (code)
XCreateSimpleWindow (code)
XGetWindowAttributes (code)
XCloseDisplay (code)
XRefreshKeyboardMapping (code)
XMapWindow (code)
XSetStandardProperties (code)
XParseGeometry (code)
XCreateWindow (code)
XGetAtomName (code)
XDisplayName (code)
XLookupString (code)
XNextEvent (code)
*** Error exit code 1

many thanks

This works for me on 11.00, you may have to modify slightly for 10.20.

gcc -o xev xev.c -DSVR4 -DSYSV -DFUNCPROTO=15 -L/usr/lib/X11R6 -lX11

BTW, you should not use the bundled compiler (cc) for general development. It is a crippled compiler which is only included so that you may rebuild your kernel if necessary. Use the ansi compiler or (preferably) gcc.