Subject: FVWM: undefined reference in fvwm-2.0.42

From: Clive Messer <[email-masked]>
Date: Wed, 24 Apr 1996 00:46:16 +0100 (BST)

Hi,

I'm not on the mailing list and would appreciate being cc'd or a direct
reply.

Linux - gcc-2.7.2 / binutils 2.6.0.12/13
fvwm-2.0.42 is 'barfing' on undefined references.

make[1]: Entering directory `/usr/src/fvwm-2.0.42/fvwm'
rm -f fvwm2
gcc -o fvwm2 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 -O2 -m486      -L/usr/X11R6/lib -L../libs
-lfvwm2 -lXpm  -lXext -lX11     -Wl,-rpath,/usr/X11R6/lib
fvwm.o: In function `InitVariables':
fvwm.o(.text+0x1819): undefined reference to `InitPictureCMap'
menus.o: In function `scanForPixmap':
menus.o(.text+0x2147): undefined reference to `CachePicture'
make[1]: *** [fvwm2] Error 1
make[1]: Leaving directory `/usr/src/fvwm-2.0.42/fvwm'

make[1]: Entering directory `/usr/src/fvwm-2.0.42/modules/FvwmButtons' 
rm -f FvwmButtons
gcc -o FvwmButtons FvwmButtons.o icons.o misc.o parse.o output.o button.o
draw.o -O2 -m486      -L/usr/X11R6/lib -L../../libs -lfvwm2 -lXpm  -lXext
-lX11     -Wl,-rpath,/usr/X11R6/lib
FvwmButtons.o: In function `main':
FvwmButtons.o(.text+0x7be): undefined reference to `InitPictureCMap'
FvwmButtons.o: In function `LoadIconFile':
FvwmButtons.o(.text+0x11b3): undefined reference to `CachePicture'
FvwmButtons.o: In function `RecursiveLoadData':
FvwmButtons.o(.text+0x1240): undefined reference to `CachePicture'
FvwmButtons.o(.text+0x12db): undefined reference to `CachePicture'
FvwmButtons.o(.text+0x1531): undefined reference to `CachePicture'
make[1]: *** [FvwmButtons] Error 1
make[1]: Leaving directory `/usr/src/fvwm-2.0.42/modules/FvwmButtons'

However, 'nm libfvwm.a' ......

Picture.o:
0000000000000110 T CachePicture
00000000000001d0 T DestroyPicture
00000000000000b0 T GetPicture
0000000000000000 T InitPictureCMap
0000000000000030 T LoadPicture
0000000000000000 b PictureCMap
0000000000000000 d PictureList
                 U XFreePixmap
                 U XGetWindowAttributes
                 U XReadBitmapFile
                 U findIconFile
                 U free
                 U safemalloc

Any ideas ?
 
Clive.
-- 
C Messer. Epos Systems. UK.  |
<[email-masked]>     |   "I pressed her thigh and death smiled."
<[email-masked]>   |    Jim Morrison.                       

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: "Brandon M. Browning" <[email-masked]>
Date: Tue, 23 Apr 1996 21:10:07 -0700 (PDT)

> fvwm-2.0.42 is 'barfing' on undefined references.

-- snip --

> 0000000000000000 d PictureList

Yep.  Try renaming the old libfvwm.a (in /usr/lib/X11) to something like
libfvwm.a.old & try relinking.  For some reason, make grabs that version
and not the version that's in ../lib.  I've run into this before & I
always rename the old libfvwm.a to something else before I link. 

A hack, but it works. :(

-- Brandon Browning                                                          )
   Powertie Software                                                        (
   http://www.powertie.org/                                                c[]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
In every real man a child is hidden who wants to play.

---

From: Clive Messer <[email-masked]>
Date: Wed, 24 Apr 1996 17:55:47 +0100 (BST)

> > fvwm-2.0.42 is 'barfing' on undefined references.

[snip]

> always rename the old libfvwm.a to something else before I link. 

I feel incredibly stupid for not immediately realising that the old lib
was getting found before the new. ;)
Suggestion: Might it be a good idea to change the Makefile to link
"../libs/libfvwm2.a", rather than "-L../libs -lfvwm2" ?

Thanks.

Clive.

---

From: <[email-masked]> (Charles Hines)
Date: Wed, 24 Apr 1996 13:48:16 -0400

>>>>> "Clive" == Clive Messer <[email-masked]> writes:

Clive> I feel incredibly stupid for not immediately realising that the old lib
Clive> was getting found before the new. ;)
Clive> Suggestion: Might it be a good idea to change the Makefile to link
Clive> "../libs/libfvwm2.a", rather than "-L../libs -lfvwm2" ?

Probably not a bad idea...I'll most likely do this for the next beta
release.

Chuck

---

From: [email-masked] (Todd Fries)
Date: Tue, 30 Apr 1996 12:41:35 -0500 (CDT)

> "../libs/libfvwm2.a", rather than "-L../libs -lfvwm2" ?

I got bitten by that myself.  My problem, however, was that I tried to
create a dynamic lib for fvwm, which worked fine until I decided to upgrade
and it looks for dynamic libs first then static ones.

-- 
Todd Fries