[MPlayer-users] Multiply defined symbol causes link failure on OS/X
Steven M. Schultz
sms at 2BSD.COM
Sat Jul 24 03:13:52 CEST 2004
Hi -
ranlib and ld are unhappy with the same symbol being defined in two
places.
Building on OS/X 10.3.4 today after a cvs update I am seeing:
cc -I../libvo -I../../libvo -I/usr/X11R6/include -O4 -mcpu=970 -mtune=970 -faltivec -pipe -ffast-math -fomit-frame-pointer -DSYS_DARWIN -DCONFIG_DARWIN -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Ilibmpdemux -Iloader -Ilibvo -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/local/include/SDL -D_THREAD_SAFE -I/usr/X11R6/include -I/usr/local/include -o mplayer mplayer.o mp_msg.o cpudetect.o codec-cfg.o spudec.o playtree.o playtreeparser.o asxparser.o vobsub.o subreader.o sub_cc.o find_sub.o m_config.o m_option.o parser-cfg.o m_struct.o unrarlib.o mixer.o parser-mpcmd.o libvo/libvo.a libao2/libao2.a libmpcodecs/libmpcodecs.a mp3lib/libMP3.a liba52/liba52.a libmpeg2/libmpeg2.a libaf/libaf.a libmpdemux/libmpdemux.a input/libinput.a postproc/libswscale.a osdep/libosdep.a -Llibmpdvdkit2 -lmpdvdkit libavcodec/libavcodec.a libavformat/libavformat.a -lmad -lvorbis -logg -ldv -ltheora -logg -lfaad -llzo -lmp3lame -lvorbis -logg -lxvidcore -lm -lpng -lz -lz -ljp!
eg -L/usr/X11R6/lib -lfreetype -ltinfo /usr/local/src/live/liveMedia/libliveMedia.a /usr/local/src/live/groupsock/libgroupsock.a /usr/local/src/live/UsageEnvironment/libUsageEnvironment.a /usr/local/src/live/BasicUsageEnvironment/libBasicUsageEnvironment.a -lstdc++ -framework Carbon -framework QuickTime -framework CoreAudio -L/usr/local/lib -lfontconfig -lGL -lXv -lXxf86vm -lXinerama -L/usr/X11R6/lib -lXext -lX11 -L/usr/local/lib -lSDLmain -lSDL -Wl,-framework -Wl,Cocoa -Wl,-framework -Wl,OpenGL -liconv -lintl -lm
ld: warning table of contents of library: libvo/libvo.a not sorted slower link editing will result (use the ranlib(1) -s option)
ld: multiple definitions of symbol _WinID
libvo/libvo.a(vo_quartz.o) definition of _WinID in section (__DATA,__data)
libvo/libvo.a(x11_common.o) definition of _WinID in section (__DATA,__data)
gmake: *** [mplayer] Error 1
_WinID is defined in both vo_quartz.c and x11_common.c and this is
causing the linking to fail. The warning about "use the ranlib..."
is because the earlier ranlib libvo.a failed with this error:
ranlib libvo.a
ranlib: same symbol defined in more than one member in: libvo.a (table of contents will not be sorted)
ranlib: file: libvo.a(x11_common.o) defines symbol: _WinID
ranlib: file: libvo.a(vo_quartz.o) defines symbol: _WinID
Should the _WinID in vo_quartz.c be made an "extern" so that there
are not two definitions?
Cheers,
Steven Schultz
More information about the MPlayer-users
mailing list