Hi, Cygwin LD seems to ignore the file extension given in a imports def file. The resulting executable attempts to load <name>.dll even if the extension of the DLL file is not ".dll". For example, windows includes a DLL file called "WINSPOOL.DRV". This is a normal DLL file that ships with windows for use by applications. Import def file: LIBRARY WINSPOOL.DRV IMPORTS ClosePrinter = WINSPOOL.ClosePrinter DocumentPropertiesA = WINSPOOL.DocumentPropertiesA OpenPrinterA = WINSPOOL.OpenPrinterA This links ok but the resulting executable fails when it attempts to load "WINSPOOL.DLL". LD version "GNU ld (GNU Binutils) 2.18.50.20080523" Nick
Created attachment 2777 [details] sample .def file to demonstrate the problem