MacOS X compilation

Axel Rose <[email protected]> Tue, 14 Oct 2003 15:52:37 +0200
Newsgroups gmane.comp.web.wml
Message-ID <p0600200bbbb1af4a2413@[172.16.172.241]>
Hello,

during compilation of wml-2.0.9 I experienced the following problem:

/bin/sh ../libtool --mode=link gcc  -g -O2   -o mp4h  builtin.o debug.o devel.o freeze.o input.o macro.o  mp4h.o output.o path.o symtab.o -lm ../lib/libmp4h.a ../pcre/libpcre.a ../intl/libintl.a /usr/local/lib/libiconv.dylib 
mkdir .libs
gcc -g -O2 -o mp4h builtin.o debug.o devel.o freeze.o input.o macro.o mp4h.o output.o path.o symtab.o /usr/local/lib/libiconv.dylib  -lm ../lib/libmp4h.a ../pcre/libpcre.a ../intl/libintl.a
ld: multiple definitions of symbol _getopt
/usr/lib/libm.dylib(getopt.So) definition of _getopt
../lib/libmp4h.a(getopt.o) definition of _getopt in section (__TEXT,__text)
ld: multiple definitions of symbol _opterr
/usr/lib/libm.dylib(getopt.So) definition of _opterr
../lib/libmp4h.a(getopt.o) definition of _opterr in section (__DATA,__data)
ld: multiple definitions of symbol _optind
/usr/lib/libm.dylib(getopt.So) definition of _optind
../lib/libmp4h.a(getopt.o) definition of _optind in section (__DATA,__data)
ld: multiple definitions of symbol _optopt
/usr/lib/libm.dylib(getopt.So) definition of _optopt
../lib/libmp4h.a(getopt.o) definition of _optopt in section (__DATA,__data)
make[2]: *** [mp4h] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


I finally got it working by adding "-u _getopt" to the gcc call.

Any thoughts?


Axel
_____________________________________________________________________
Website META Language (WML)                         http://thewml.org
User Support Mailing List                        [email protected]
Automated List Manager                            [email protected]