delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <2fb803240606010717r5aadc9afud2899ea77a53f02a@mail.gmail.com> |
Date: | Thu, 1 Jun 2006 22:17:36 +0800 |
From: | "Alvin Cao" <alvin DOT cao AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | elf2flt linkage error in cygwin |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |