public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Mark Rivers <rivers@cars.uchicago.edu>
To: "'cygwin@cygwin.com'" <cygwin@cygwin.com>
Subject: Problem linking with an import library (.lib) file:
Date: Wed, 13 May 2015 23:38:00 -0000	[thread overview]
Message-ID: <70AE7462E7AD054C89DCBA45343D499A65860EBD@CARSMAIL2.CARS.APS.ANL.GOV> (raw)
In-Reply-To: <70AE7462E7AD054C89DCBA45343D499A65860E12@CARSMAIL2.CARS.APS.ANL.GOV>

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

       reply	other threads:[~2015-05-13 22:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <70AE7462E7AD054C89DCBA45343D499A65860E12@CARSMAIL2.CARS.APS.ANL.GOV>
2015-05-13 23:38 ` Mark Rivers [this message]
2015-05-14 15:43   ` Mark Rivers
2015-05-15  0:47     ` JonY
2015-05-15 20:50     ` Mark Rivers
2015-05-16  4:58       ` JonY
2015-06-12 21:01 Laurent Tassan-Got

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70AE7462E7AD054C89DCBA45343D499A65860EBD@CARSMAIL2.CARS.APS.ANL.GOV \
    --to=rivers@cars.uchicago.edu \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).