I'm writing a library which has an _init() function. I've used to compile this with: gcc -shared -fpic -c foo.c; ld -shared foo.o -o foo.so -ldl -L/usr/X11R6/lib -lX11 When I'm trying to use libtool, I get: [peter@sofie lib]$ make /bin/sh ../libtool --mode=link gcc -g -O2 -ldl -o libfoo.la -rpath /usr/local/lib foo.lo rm -fr .libs/libfoo.la .libs/libfoo.* .libs/libfoo.* gcc -shared foo.lo -ldl -lc -Wl,-soname -Wl,libfoo.so.0 -o .libs/libfoo.so.0.0.0 foo.lo: In function `_init': /usr/home/peter/xalf/lib/foo.c:31: multiple definition of `_init' /usr/lib/crti.o(.init+0x0): first defined here collect2: ld returned 1 exit status make: *** [libfoo.la] Error 1 This can be solved by adding -nostartfiles to gcc, but how can I tell libtool to do so? Are there any other solutions to this problem? /Peter Astrand <[EMAIL PROTECTED]>
