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:content-type :content-id:content-transfer-encoding:mime-version; q=dns; s= default; b=f5kkWhqqPgjTZyYq4f27BJExGZZuGcO/XhdylPXw79YF+zpNvMjul 4HKo2loyN9rPxnMhNMBEPldG5hVhH6yAJaRIKaqz9ejNPWfvNxdsl5ARZKoFjmLw qZKSLiOl22YrciRT7dCr5bskc1q5hlwST6Vu0O89oEFE8GjcfL6I1M= 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:content-type :content-id:content-transfer-encoding:mime-version; s=default; bh=Nmco51y7SOfVTGVudjHdCkHqaKE=; b=Nc45pDrVk6KPpoTP1xR+GhCQ0W3C 0SI2ZglN+lBN0Luht4C9kPB0P0DMyMNRb/i772nIocn3bo63p8PZVHFP11y3QDTS XOiQi2TnPxGq+iuiLDebGk1eQXvzSKm6US5r6kFq8zW6mjUvDzP6SS0AaL1Z2np5 kWmQM26lAwthO/Q= 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=-0.7 required=5.0 tests=AWL,BAYES_00,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=sk:billzis, Full X-HELO: na01-bn1-obe.outbound.protection.outlook.com From: Bill Zissimopoulos To: "cygwin AT cygwin DOT com" Subject: N00b question regarding Cygwin and delay loading Date: Mon, 20 Jun 2016 00:28:46 +0000 Message-ID: authentication-results: spf=none (sender IP is ) smtp.mailfrom=billziss AT navimatics DOT com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-office365-filtering-correlation-id: ead42971-9e63-4c1a-cf0f-08d398a1d7ec x-microsoft-exchange-diagnostics: 1;CY1PR07MB2200;6:J+/q73mcv21ORqMFNJh1D4HPus/NJRs9sRdIosOEp8/F0a1/qXQ1oQkNfi3AaPVBZaznLRlgoM48sFpDvRJmQKsvseE2fDaoHZUgEwF8bsjp5HLFoGxqJpdQaMkNSVHYBsQzzEDBMt9YS15WmJAARpKfQRLrGWO44iPVXFHeIa1xovc3UMkAoaQi2WydnalVQcDzcO6GD6/+YCZRHvH+ccCHUHryfBfCDmSZoHt47Lbxs0Rln7NW3PucdVh8YStFpHe5FTypxt+6c1uSPI5ifmbwKpmF42hdMRYFLdrgNqOgNjn6rG54bbSSmbNndEXs;5:NMDKysgOSv6BRTUyXG0cdtTziiYclPa7aCdAihIA2w0USn7slbEb7Or4wzcXQtnlCUi0HEoyPpQBEYTh0iARGKBMJuJS2njhpbT+ZWHr2265MLr7iLxhaRpi5aaxs+yFGXj3W/nWL7cxdBbVm+okCg==;24:JYQoD1oAJRogyjqTdQ7fjfR+8mWs5ugqPLa30e9ZlyUGr9ALCPN7XiGZKminqV0B5CWnF4dUjPQXXD0D68nh74UynqpSjTfjQCR5OFY2RwM=;7:jCAAXcpT0cazHbEzMX4ctCa01CoYcUxA1Pr0f5m8uJ5XShXRlybaYx17go+rB06b2t2qHeNfaQchBhTjNwVz7TNkfSISTfOJUmvDn70B6XprRvEbfhXnDZf/J+CUa7QjCjX8uHjOALW/EWDKxKGstQrOfzpLho5lexDAn61q8K2RVOSAYCxDmZU9WbJQs94ZuzpdBmf9l+xfaQ4TIQ+yVa1XKFVQFilFS4NUHKtTlMnKsad+axUSf4v9v9MpfO9R x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR07MB2200; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(5213294742642); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040130)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041072)(6043046)(6042046);SRVR:CY1PR07MB2200;BCL:0;PCL:0;RULEID:;SRVR:CY1PR07MB2200; x-forefront-prvs: 09796A1B83 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(199003)(189002)(2900100001)(5004730100002)(450100001)(77096005)(11100500001)(92566002)(5002640100001)(3660700001)(3280700002)(122556002)(36756003)(99286002)(87936001)(106356001)(105586002)(2351001)(106116001)(229853001)(8676002)(110136002)(107886002)(10400500002)(97736004)(66066001)(101416001)(54356999)(50986999)(86362001)(2501003)(19580395003)(2906002)(68736007)(8936002)(81156014)(102836003)(6116002)(3846002)(189998001)(586003)(19580405001)(5640700001)(7846002)(1730700003)(81166006)(94096001)(19627235001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR07MB2200;H:CY1PR07MB2199.namprd07.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: navimatics.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: <4CB81CD957B2DD42836FE2EC0A79577F AT namprd07 DOT prod DOT outlook DOT com> MIME-Version: 1.0 X-OriginatorOrg: navimatics.com X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2016 00:28:46.5136 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 21071be9-4f9a-413b-89ac-8353a5d2410a X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2200 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id u5K0TC8G016274 TLDR: I am trying to use delay loading with Cygwin. Is it supported? I have found information that I can do something along the following lines: gendef NATIVE.dll dlltool --input-def NATIVE.def --output-delaylib NATIVE.dll.a gcc -shared -o cygNAME.dll -Wl,--out-implib=libNAME.a NAME.c NATIVE.dll.a However the messages that I get back say that I am missing the symbol __delayLoadHelper2. Which actually makes sense. But where is Cygwin’s delayimp.lib? Is there even one? Or am I supposed to somehow use this with MSVC’s delayimp.lib? Or perhaps this is just a MinGW feature and not supported on Cygwin? Thank for any help. Full (failing) make output below: << billziss AT windows:~/Projects/winfsp/src/cygwin [libfuse]$ make gendef "/cygdrive/c/Program Files (x86)/WinFsp/bin/winfsp-x64.dll" * [/cygdrive/c/Program Files (x86)/WinFsp/bin/winfsp-x64.dll] Found PE+ image dlltool --input-def winfsp-x64.def --output-delaylib winfsp-x64.dll.a gcc -shared -o cygfuse.dll -Wl,--out-implib=libfuse.a -I../../inc/fuse cygfuse.c winfsp-x64.dll.a winfsp-x64.dll.a(dwjdh.o):fake:(.text+0x15): undefined reference to `__delayLoadHelper2' winfsp-x64.dll.a(dwjdh.o):fake:(.text+0x15): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__delayLoadHelper2' collect2: error: ld returned 1 exit status make: *** [Makefile:7: cygfuse.dll] Error 1 >> Bill