I have 2 modules, each with their own _init and _fini functions. My Makefile.am file is as follows: lib_LTLIBRARIES = dns.la select.la dns_la_SOURCES = dns.c dns_la_LDFLAGS = -module $(LDFLAGS) select_la_SOURCES = select.c select_la_LDFLAGS = -module $(LDFLAGS)
After running automake, autoconf, etc, I try to compile, and I receive this, minus start/end wrappers: ****************** START ****************** /bin/bash ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../include -g -O2 -c -o dns.lo `test -f 'dns.c' || echo './'`dns.c mkdir .libs gcc -DHAVE_CONFIG_H -I. -I. -I../../include -g -O2 -c dns.c -fPIC -DPIC -o .libs/dns.lo gcc -DHAVE_CONFIG_H -I. -I. -I../../include -g -O2 -c dns.c -o dns.o >/dev/null 2>&1 mv -f .libs/dns.lo dns.lo /bin/bash ../../libtool --mode=link gcc -g -O2 -o dns.la -rpath /usr/local/lib -module dns.lo rm -fr .libs/dns.la .libs/dns.* .libs/dns.* gcc -shared dns.lo -Wl,-soname -Wl,dns.so.0 -o .libs/dns.so.0 dns.lo: In function `_init': /services/services/src/modules/dns.c:40: multiple definition of `_init' /usr/lib/crti.o(.init+0x0): first defined here dns.lo: In function `_fini': /services/services/src/modules/dns.c(.text+0x88): multiple definition of `_fini' /usr/lib/crti.o(.fini+0x0): first defined here *** Error code 1 ****************** END ****************** What I need help with is compiling the so modules. I have no idea what crti.o is. I've no trouble compiling when doing so manually, but I compile without linking, and call ld separately. I would rather use the automake suite, however, than writing the entire Makefiles on my own. Thanks in advance for any help provided. __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/