Hi,
I tried to compile 0.12-rc2 for Tiger (10.4) and I got a lot of warnings
on linking:
/bin/sh ../libtool --mode=link gcc -Wall -I/sw/include/gtk-1.2 -I/sw/
include/glib-1.2 -I/sw/lib/glib/include -D_REENTRANT -I/usr/X11R6/
include -I/sw/include/gdk-pixbuf-1.0 -I/sw/include/gtk-1.2 -I/sw/
include/glib-1.2 -I/sw/lib/glib/include -I/usr/X11R6/include -I/sw/
include -I/sw/include/xmms -I/sw/include/gtk-1.2 -I/sw/include/
glib-1.2 -I/sw/lib/glib/include -I/usr/X11R6/include -g -O2 `xml2-
config --cflags` -I.. -I.. -DDATADIR=\"/usr/local/share\" -
DDATEOFBUILD=\"`date +%Y%m%d`\" -DLOCALEDIR=\"/usr/local/
share/locale\" -g -O2 -o libcoverview.la -rpath /sw/lib/xmms/
General -module -avoid-version coverview.lo cd-discid.lo filetype.lo
graphics.lo plugconf.lo globals.lo interface-xmms.lo lyrc.lo lyrc_site.lo
window.lo -L/sw/lib -lglib -L/sw/lib -L/usr/X11R6/lib -lgtk -lgdk -
lgmodule -lgthread -lglib -lpthread -lintl -lXext -lX11 -lm -L/sw/lib -
lgdk_pixbuf -L/sw/lib -L/usr/X11R6/lib -lgtk -lgdk -lgmodule -lglib -
lintl -lXext -lX11 -lm -L/sw/lib -L/sw/lib -L/usr/X11R6/lib -lgtk -
lgdk -lgmodule -lglib -lintl -lXext -lX11 -lm -lxmms /sw/lib `xml2-
config --libs`
gcc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/
libcoverview.so -bundle .libs/coverview.o .libs/cd-discid.o .libs/
filetype.o .libs/graphics.o .libs/plugconf.o .libs/globals.o .libs/
interface-xmms.o .libs/lyrc.o .libs/lyrc_site.o .libs/window.o -L/sw/lib
-L/usr/X11R6/lib /sw/lib/libgthread.dylib /sw/lib/libgdk_pixbuf.dylib
/usr/X11R6/lib/libXext.dylib /usr/X11R6/lib/libX11.dylib /sw/lib/
libgtk.dylib /sw/lib/libgdk.dylib /sw/lib/libgmodule.dylib /sw/lib/
libglib.dylib /sw/lib/libintl.dylib -lXext -lX11 /sw/lib/libxmms.dylib /
sw/lib/libxml2.dylib -lz -lpthread /sw/lib/libiconv.dylib -lm
ld: multiple definitions of symbol _Posx
.libs/coverview.o definition of _Posx in section (__DATA,__common)
.libs/filetype.o definition of _Posx in section (__DATA,__common)
ld: multiple definitions of symbol _Posy
.libs/coverview.o definition of _Posy in section (__DATA,__common)
.libs/filetype.o definition of _Posy in section (__DATA,__common)
ld: multiple definitions of symbol _Xwin
.libs/coverview.o definition of _Xwin in section (__DATA,__common)
.libs/filetype.o definition of _Xwin in section (__DATA,__common)
ld: multiple definitions of symbol _Ywin
.libs/coverview.o definition of _Ywin in section (__DATA,__common)
.libs/filetype.o definition of _Ywin in section (__DATA,__common)
ld: multiple definitions of symbol _album_search
.libs/coverview.o definition of _album_search in section
(__DATA,__common)
.libs/filetype.o definition of _album_search in section
(__DATA,__common)
ld: multiple definitions of symbol _auto_hide
.libs/coverview.o definition of _auto_hide in section
(__DATA,__common)
.libs/filetype.o definition of _auto_hide in section (__DATA,__common)
ld: multiple definitions of symbol _cdaudio_player
.libs/coverview.o definition of _cdaudio_player in section
(__DATA,__common)
.libs/filetype.o definition of _cdaudio_player in section
(__DATA,__common)
...
this goes on and on.
Checking the sources I found that this is due to the header files which
define variables.
Each time the header file is included in another c-file another instance
of that variable is created. Eg. "globals.h" defines 'int ..., Posx,...;'.
"globals.h" is included in filetype.c and in globals.c. Each of the files
will get an own instance of 'Posx'.
The problem can be avoided if eg. Posx would be defined as 'extern int
..., Posx, ...;' in "globals.h" and in "globals.c" Posx would be
instantiated once as 'int ..., Posx, ...;'
Best regards,
Thomas
Logged In: NO
did you make it compile? patch?