Additional information: - This is Cygwin 2.0.1, 32-bit on a Windows 7 64-bit machine.
The "file" utility claims it is an archive file: $ file ../../lib/cygwin-x86/PlxApi.lib ../../lib/cygwin-x86/PlxApi.lib: current ar archive The "nm" utility appears to interpret the file OK: rivers@rivers-mobile2 /corvette/home/epics/devel/dxp/dxpApp/handelSrc $ nm ../../lib/cygwin-x86/PlxApi.lib PlxApi631.dll: 00000000 i .idata$2 00000000 i .idata$4 00000000 i .idata$5 00000000 i .idata$6 000420ff a @comp.id 00000000 I __IMPORT_DESCRIPTOR_PlxApi631 U __NULL_IMPORT_DESCRIPTOR U ⌂PlxApi631_NULL_THUNK_DATA PlxApi631.dll: 000420ff a @comp.id 00000000 I __NULL_IMPORT_DESCRIPTOR PlxApi631.dll: 000420ff a @comp.id 00000000 I ⌂PlxApi631_NULL_THUNK_DATA ... PlxApi631.dll: 00000000 I .idata$4 00000000 I .idata$5 00000000 I .idata$6 00000000 T .text 00000000 I __imp__PlxPci_VpdRead U __IMPORT_DESCRIPTOR_PlxApi631 00000000 T _PlxPci_VpdRead PlxApi631.dll: 00000000 I .idata$4 00000000 I .idata$5 00000000 I .idata$6 00000000 T .text 00000000 I __imp__PlxPci_VpdWrite U __IMPORT_DESCRIPTOR_PlxApi631 00000000 T _PlxPci_VpdWrite -----Original Message----- From: Mark Rivers Sent: Wednesday, May 13, 2015 5:41 PM To: 'cygwin@cygwin.com' Subject: Problem linking with an import library (.lib) file: 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