Operating System - HP-UX
1753511 Members
5375 Online
108795 Solutions
New Discussion юеВ

Can't find library: "Xaw" problem

 
SOLVED
Go to solution
Achilles_2
Regular Advisor

Can't find library: "Xaw" problem

I have a HP A500 server which is using 11.00, now I have installed cxterm which exports term for viewing Chinese fonts.
However, I am having a problem building "Id". During the compiling of the software:

making all in ./cxterm...
cc -O -Aa -Dhpux -DSYSV -D_HPUX_SOURCE -DHANZI -c HZpopup.c
cc -O -Aa -Dhpux -DSYSV -D_HPUX_SOURCE -DHANZI -c HZutil.c
if [ -f cxterm ]; then rm -f cxterm~; mv -f cxterm cxterm~; fi
cc -o cxterm -O -Aa main.o input.o charproc.o cursor.o util.o tabs.o screen.o scrollbar.o button.o Tekproc.o misc.o VTPrsTbl.o TekPrsTbl.o data.o menu.o HZInput.o HZinMthd.o HZinArea.o HZchList.o HZinCntx.o HZfilter.o HZbuiltn.o HZtrie.o HZtrieWc.o HZassoc.o HZpopup.o HZutil.o -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 -lcurses

I get the error shown below:
/usr/ccs/bin/ld: Can't find library: "Xaw"

I found /usr/contrib/X11R6/include/X11/Xaw/XawInit.h existed. How can I solve the problem out?

Thanks in advance

Alex
5 REPLIES 5
curt larson_1
Honored Contributor
Solution

Re: Can't find library: "Xaw" problem

ld is the link editor, see man ld.
the issue is ld can not find the libXaw file. You'll have to specify it's location using the -L option.
Achilles_2
Regular Advisor

Re: Can't find library: "Xaw" problem

curt,

I have still no idea to create link, pls give me advise.

Thanks
Alex

curt larson_1
Honored Contributor

Re: Can't find library: "Xaw" problem

you'll need to find where libXaw is. probably under /usr somewhere.

find /usr -name "libXaw*"

in your cc command you'll need to add a -L switch to tell ld where libXaw is, it has to be before the -lXaw switch

-L /usr/... -lXaw

you can read more about it by doing a man on cc or ld
Mike Stroyan
Honored Contributor

Re: Can't find library: "Xaw" problem

The library is in /usr/contrib/X11R6/lib/libXaw.a .
You could use "export LDOPTS=-L/usr/contrib/X11R6/lib" before running make.
Fred Ruffet
Honored Contributor

Re: Can't find library: "Xaw" problem

IMHO you should rather add /usr/contrib/X11R6/lib to your LD_LIBRARY_PATH :
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/contrib/X11R6/lib
export LD_LIBRARY_PATH

regards,

Fred
--

"Reality is just a point of view." (P. K. D.)