From: jonas@beor.informatik.rwth-aachen.de (Josef Nelissen)
Subject: Re: The PW library on HP700
Organization: Rechnerbetrieb Informatik  /  RWTH Aachen
Date: 28 Aug 92 07:27:12 GMT

francois@mot.com (Andre Francois) writes:

>Does anyone know what the PW library is for.  I cannot "kmake" some 
>motif1.1 examples because they require this library (i.e. libPW.a) which
>I don't have in my system (an HP705 cluster node under an HP720 server
>running HP-UX 8.07, X11R4).  Please help!

My mail bounced several times, so I resort to posting

The PW library is used by the file selection box. As far as I know, it
uses the functions regcmp() and regex() to search for regular
expression filenames. I'm working an a single HP720 and have got this
library, so I would guess that perhaps your system wasn't installed
correctly.
BTW there are some known problems even if you have got this library:

(included from the man page to regcmp, regexp)

> regcmp  and  regex   are   kept   in   /lib/libPW.a.    Unfortunately,
> /lib/libPW.a  also contains some functions that have the same names as
> functions contained in the default C library, /lib/libc.a.  To prevent
> unexpected  results  due  to  these name conflicts, always search libc
> before searching libPW.  This is done with the ld (or cc) command line
> option  sequence  -lc  -lPW  which satisifies all standard C functions
> from libc then searches libPW  for  the  regcmp  and  regex  functions
> (there  is  also an implied -lc following the explicit -lPW to satisfy
> any additional C functions required by regcmp and regex).

I remember that - though aware of this - I run in trouble as I
compiled some examples for the FSBox some month ago. Unfortunately I
don't remember how I solved it but - perhaps fortunately for you :-) - I
kept some postings referring to this problem (now included)

>> The MOTIF on HP/UX 8.07 has numerous problems.  I can't understand
>> it as I was told that this is the development platform for MOTIF.
>> Problems include:

> I just ported my app to a 720, running HP/UX 8.07.

(stuff deleted)

>>      There is no sequence of loading the -lPW library that
>>      will allow something that incliudes an FileSB widget
>>      to compile properly.

> That's a pretty stong statement.  It just BEGS to be contradicted :)
> I had a problem with -lPW but it works now.  Here are the
> lines from my makefile:

> #
> # -lc -lPW -lc
> # -lPW is for the XmFileSelectionBox.
> # the duplicate -lc's are to resolve the "Error" symbol.
> #
> #
> GLIBS=-lphigs -lXm -lXt -lXwindow -lsbdl -lsb -ldld -lXhp11 -lX11 \
>       -lmalloc -lm -lc -lPW -lc

> Note that I use PHIGS too, so you won't need all of the libraries I use.
> But the order is very important.

> if it's of interest, I also use

>  -I/usr/include/Motif1.1 -I/usr/include/X11R4
> and
>  -L/usr/lib/X11R4 -L/usr/lib/Motif1.1
>       to get the right X #includes and libs,

> and -Aa -D_HPUX_SOURCE
>       to allow both ANSI and K&R C.

> hope this helps.

> wendy robbins
> sterling software
> wendy@gsp.sterling.com

Hope this helps as well :-)

Josef
-- 
Josef Nelissen, Lehrstuhl fuer Angewandte Mathematik, insbesondere Informatik;
RWTH-Aachen, 5100 Aachen, Germany
jonas@beor.informatik.rwth-aachen.de;
Newsgroups: comp.windows.x.motif,comp.windows.x