hi folks, I'm trying to build a toolchain in cygwin for uclinux. The program "elf2flt" links against both libcygwin and libiberty from arm-uclinux-elf-binutils. There are "getopt" implementations in both libs and I got the error message:
===============log========================== gcc -g -O2 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SY S_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_ UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_BFD_H=1 -DHAVE_VPRINTF=1 -DTARGET_arm -I/cygdrive/d/cyghome/build_toolchain/arm-uclinux-elf-binu tils/bfd -I/cygdrive/d/cyghome/build_toolchain/binutils-2.16.1/include -o elf2flt.exe /cygdrive/d/cyghome/build_toolchain/elf2flt-20060601/elf2flt.c /cygdrive/d/cyghome/build_toolchain/elf2flt-20060601/stubs.c -lcygwin /cygdrive/d/cyghome/build_toolchain/arm-uclinux-elf-binutils/bfd/libbfd.a /cygdr ive/d/cyghome/build_toolchain/arm-uclinux-elf-binutils/libiberty/libiberty.a /cygdrive/d/cyghome/build_toolchain/arm-uclinux-elf-binutils/libiberty/libiberty.a(getopt.o): In function `getopt': /cygdrive/d/cyghome/build_toolchain/binutils-2.16.1/libiberty/getopt.c:977: multiple definition of `_getopt' /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(d000932.o):: first defined here collect2: ld returned 1 exit status make: *** [elf2flt.exe] Error 1 ==============log============================ It seems libcygwin is linked prior to libiberty but it does not work. How can I link the correct lib? Any help is appreciated! -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/