Re: Compiling utils3_ak eventalarm on hpux
Posted in 2000
Topics: Storage & Space Management, Platform-Specific Issues
Tony Flaherty wrote: > > Hi, > > HpUx 10.20 > Ansi C Compiler > > I'm trying to compile the eventalarm program:- > > cc -o eventalarm eventalarm.c gservlog.c readn.c -lgen > > I get the following error;- > > /usr/ccs/bin/ld: Can't find library for -lgen > > echo $LPATH gives > > /usr/lib If memory serves you need libgen.a for the basename function. Find out what library contains that function on HP (it is libgen on Solaris and DG/UX) and substitute that. Let me know so I can update the makefiles in the package. If Hp/UX does not have a basename() function it is trivial to write it returns the part of its one char * argument that follows the last slash (/). Similar to the basename shell utility but it does not also strip the file extention. Art S. Kagel
"Art S. Kagel" <kagel@bloomberg.net> writes: > If memory serves you need libgen.a for the basename function. Find out what > library contains that function on HP (it is libgen on Solaris and DG/UX) and > substitute that. Let me know so I can update the makefiles in the package. > If Hp/UX does not have a basename() function it is trivial to write it > returns the part of its one char * argument that follows the last slash (/). > Similar to the basename shell utility but it does not also strip the file > extention. The basename(3C) on HP-UX (10.20 and 11.0) is in libc. No additional libraries are needed. If you get unresolved symbols when linking, try to find the missing library. I use something like this: nm -r /usr/lib/lib*.a | grep ':basename|.*\\$CODE\\$$' which hopefully gives you the libraries where this function is defined. -- 'yvind Gjerstad Systems dept DFDS Tollpost-Globe AS N-6301 'ndalsnes/Norway E-mail: ogj@tollpost.no Phone: +47 7122 6663 Fax: +47 7122 6694