SUMMARY : Fvwm 95 Compiling Problem -- ld: Undefined symbol

From: Angus C.K. HUANG (angus@avant.com.tw)
Date: Tue Jan 21 1997 - 19:30:52 CST


Dear Sun Managers,

Thanks a lot for your help. I have solved the Fvwm compiling problem.

My original problem is :

>Dear Sun Managers,
>
>I try to complier Fvwm95 on my SunOS 4.1.4 with X11R5 system today
>and I got these messages when I compling Fvwm95.
>
>Making all in libs
>Making all in fvwm
>gcc -o fvwm95-2 add_window.o bindings.o borders.o builtins.o
>colormaps.o colors.o complex.o decorations.o events.o focus.o
>functions.o fvwm.o icons.o menus.o misc.o module.o move.o
>placement.o read.o resize.o style.o virtual.o windows.o -L../libs
>-L/usr/lib/X11 -lfvwm95-2 -lXpm -lXext -lX11
>ld: Undefined symbol
> _strerror
>collect2: ld returned 2 exit status
>*** Error code 1
>make: Fatal error: Command failed for target `fvwm95-2'

Special Thanks to these Gentlemen,

      William L. Hamlin <whamlin@connetsys.com>
      Matthew Stier <Matthew.Stier@MCI.Com>
      Fedor Gnuchev <qwe@ht.eimb.rssi.ru>
      Rich Kulawiec <rsk@itw.com>

The way to solve this problem is to add a strerror function in my complier
directory. Becuase SunOS didn't provide strerror function.

Following is the mail from "William L. Hamlin (Bill)".

*****************************************************************************

I'm pretty sure that the strerror function is not available on SunOS.
All it does is translate an error number into text, so you could probably
go into the code and reasonably simply remove references to it. Or,
alternatively, you could define a function such as follows:

char*
strerror ( int errnum ) {
        static char message[32];

        sprintf(message,"Error number %d",errnum);
        return message;
}

Compile this and link it in in the Makefile. It won't return the nice
error messages that strerror() does, but it will give enough information
to track down the messages elsewhere.

Either way, this should at least get it to compile. I'd probably opt for
option 2 as it doesn't reduce any functionality too far and is much
simpler.

Good luck!

    - Bill
****************************************************************************

Best Regards,
Angus

--
 Avant Technology Inc.                  Hsinchu, Taiwan
 Angus C.K. HUANG           E-mail : angus@avant.com.tw



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:43 CDT