X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; q=dns; s=default; b=oCW /6PXxNQ4Lef/GBW82t2C/6HrHiowF9lwq86b1UIcnHnLbb19U9YfKy+s+It/4UY8 wsACyJy0NgihIqZ1PtG6FaNB2eZNnMgm2vjXBauf+vQIihHfbFT5dnshPdLu1xNg zxdWlv6n+QhRfJVrsFLtrI9n4uQ+SLSAj9VvUkBA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; s=default; bh=ZLWXquDFT PFRCwrA8RukzOIVcmU=; b=ijoIHPKo93rz33hgzQlg8/ZApmkpQZi9hne+Negs5 B1Wtekxn/2bZzPIHzsT6Nz4UydciXCRmuilJsckwjVQIrggYGLFW6j9HRHzjXnvg ZttupFNcRW7YMgxF/xUXjpUegvgwzFMwKMK2P8JjG2shwBdel97yVt+infgnJQi4 +A= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.7 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: ipnmail.in2p3.fr Message-ID: <557B48AD.5090504@ipno.in2p3.fr> Date: Fri, 12 Jun 2015 23:01:33 +0200 From: Laurent Tassan-Got User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Problem linking with an import library (.lib) file: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes I got the same problem as Mark Rivers, already reported with the same subject. I'm running cygwin 32-bits version 2.0.3 under Windows 7 64 bits I got from a hardware manufacturer a DLL N957lib.dll and the associated import library N957lib.lib When I try to link a small test program with the command: gcc -Wall -DWIN32 -I. -o tst tst.c ./N957lib.lib I get the message: "N957lib.lib: error adding symbols: Format de fichier non reconnu" (File in wrong format) Now if I use the MingW compiler (either under cygwin or Msys): i686-pc-mingw32-gcc -Wall -DWIN32 -I. -o tst tst.c ./N957lib.lib everything is fine and the program (tst.exe) executes as expected, for example printing error messages issued by the library. But this doesn't help me because I need the full cygwin capabilities (X11, Lesstif) The cygwin gcc version is 4.9.2, while the MingW one is 4.7.3, so that it seems that there is a problem in decoding .lib libraries with the newest gcc versions. I tried to bypass the problem by re-building the .lib from the dll by using pexports and dlltool. I get a .lib with the right format, readable by gcc, but some references are still missing at the link stage. Any hint about the gcc (ld) decoding of .lib ? -- ************************************ * Laurent TASSAN-GOT * * IPN - Bat 102 * * Universite Paris-Sud * * 91406 ORSAY Cedex (France) * * tel : 33 1 69 15 72 55 * * fax : 33 1 69 15 45 07 * * email : tassango AT ipno DOT in2p3 DOT fr * ************************************ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple