delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/05/13/18:41:29

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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; q=dns; s=default; b=keCJ4x3eIYhqyQr2lg53XbQGgJrIV
bFm6LpDI6esMSGOsCRgtRrnrgZarLNs+dqoxsR6SmT10L6tmMA320Tht7xJ6kA0U
B86dwQq/nw1JKyXuSkKO0nSimW//AfwCecuAjg3n1w6KQ1U0GBaZi9+FhHBZiKU4
yD1TFiPpz8Uo4U=
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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; s=default; bh=YxaHw3H1QNzyANbbQOWYNrOsa7s=; b=o/w
aDTggtIpEyI/5mmDLECXLjfHkvGIlY8QMZUuyLR3oybo1VTirdqmLiC6/OpEXoay
aKCWdWRWXysho9wszjNFuzWg+XgpB0K71+eOZHUOSlTijW8yBYkMFx76Q/AfgwwA
9HEOyp/nQaWWXiKLnR4zN/jqiFjPAztST5JaddKA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=3.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2
X-HELO: carsmail2.cars.aps.anl.gov
From: Mark Rivers <rivers AT cars DOT uchicago DOT edu>
To: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: Problem linking with an import library (.lib) file:
Date: Wed, 13 May 2015 22:41:07 +0000
Message-ID: <70AE7462E7AD054C89DCBA45343D499A65860EBD@CARSMAIL2.CARS.APS.ANL.GOV>
References: <70AE7462E7AD054C89DCBA45343D499A65860E12 AT CARSMAIL2 DOT CARS DOT APS DOT ANL DOT GOV>
In-Reply-To: <70AE7462E7AD054C89DCBA45343D499A65860E12@CARSMAIL2.CARS.APS.ANL.GOV>
MIME-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t4DMfQE9023167

Folks,

I am having trouble linking with a normal Windows import library file when creating a DLL on Cygwin.  These same import libraries worked fine when creating static Cygwin executables with older versions of Cygwin.

The error is: "error adding symbols: File in wrong format".

This is an example of the error (I have reformatted the long g++ command onto multiple lines to make it more legible):

$ make
make -C O.cygwin-x86 -f ../Makefile TOP=../../.. \
    T_A=cygwin-x86 install
make[1]: Entering directory '/cygdrive/j/epics/devel/dxp/dxpApp/handelSrc/O.cygwin-x86'
g++ -o handel.dll -shared -Wl,--out-implib,handel.lib -L/cygdrive/j/epics/devel/dxp/lib/cygwin-x86 
    -L/cygdrive/h/epics/base-3.14.12.5/lib/cygwin-x86        -m32              
    xerxes.o xerxes_log.o md_log.o handel.o fdd.o psl.o handel_dbg.o handel_detchan.o handel_dyn_default.o 
    handel_dyn_detector.o handel_dyn_firmware.o handel_dyn_module.o handel_file.o handel_log.o handel_memdbg_win32.o 
    handel_run_control.o handel_run_params.o handel_sort.o handel_system.o handel_xerxes.o xia_assert.o xia_file.o 
    xia_mem.o xia_mem_point.o saturn.o saturn_psl.o xmap.o xmap_psl.o mercury.o mercury_psl.o xia_epp.o xia_plx.o 
    xia_usb.o xia_usb2.o md_win32.o    
    -lrecIoc -lsoftDevIoc -lmiscIoc -lrsrvIoc -ldbtoolsIoc -lasIoc -ldbIoc -lregistryIoc  -ldbStaticIoc -lca -lCom -lDLPORTIO -lPlxApi  -lsetupapi -lUser32 -lpthread    -lm
/cygdrive/j/epics/devel/dxp/lib/cygwin-x86/PlxApi.lib: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
/corvette/usr/local/epics/base-3.14.12.5/configure/RULES_BUILD:300: recipe for target 'handel.dll' failed
make[1]: *** [handel.dll] Error 1
make[1]: Leaving directory '/cygdrive/j/epics/devel/dxp/dxpApp/handelSrc/O.cygwin-x86'
/corvette/usr/local/epics/base-3.14.12.5/configure/RULES_ARCHS:64: recipe for target 'install.cygwin-x86' failed
make: *** [install.cygwin-x86] Error 2

So it is complaining that the library PlxApi.lib is not in the correct format.  However, this is definitely a valid Windows import library file.

Thanks,
Mark Rivers


--
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019