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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=Ekg9A6NRjz6aPLrjLReBIom2wCsccU+8KSv8QUbRFcSRFwCCjVFhp cq18hqW0kQ7LlCuIHMKXzJZwN1Tm7i/dtoQyXTcw4RMjOSFyFlR9Ijz9lbJYVFZm zqvW5BkcLaQjrOg2ei6VJcJA1XyF9jfsI+oMPQ06t8hnvSGUP9vsh4= 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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=SQeFf6rCBqhQtZatUlDRWGtDHb8=; b=vmVWxl4ybAksBRxBJS2qpbdoE3/5 Hjdq0DCR0wOPvWc1+cdYwk/7LQhv18yn6ff+adIZZX2dgXtWi8EQHlHLpPxvEopD 5IYESbBaam5SPKhSyTz7c/jB8ldviT0aY5xvTIlrv010KunMIZ29cM9v9jGsl831 GcjAvbzb5Tiv4Ac= 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=-101.9 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_PBL,RDNS_DYNAMIC,USER_IN_WHITELIST autolearn=no version=3.3.2 spammy=dll, visual, DLL, pexports X-HELO: calimero.vinschen.de Date: Fri, 18 Dec 2015 16:34:24 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Problems using a DLL with Cygwin 64 bit Message-ID: <20151218153424.GK3507@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <567413F7 DOT 8070904 AT observatorysciences DOT co DOT uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hkxLWrKAgbGf75mf" Content-Disposition: inline In-Reply-To: <567413F7.8070904@observatorysciences.co.uk> User-Agent: Mutt/1.5.23 (2014-03-12) --hkxLWrKAgbGf75mf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Dec 18 14:11, Philip Taylor wrote: >=20 > Thank you for the reply. My situation is this: I was supplied Windows 32-= bit > and 64-bit .dll and .lib files by the manufacturer, which I believe were > created using MS Visual Studio. These are to enable me to use the API for > this camera from my software. >=20 > Building using GCC tools with cygwin, my initial attempt at linking with > this API library failed with the message : "error adding symbols: File in > wrong format.". >=20 > I then discovered that by creating and using a new .lib file for this API > DLL, using the pexports and dlltools utilities, I could get the link to > succeed. >=20 > Then (under 64 bit Cygwin) I got the message "*** fatal error - cygheap b= ase > mismatch detected". Yeah, that's what I was trying tro explain in my first reply. Did you see the three potential problems I outlined? You'll have to debug what the actual problem is. > What exactly did you mean by "You're not trying to load the Cygwin DLL at > runtime dynamically?". I am trying to build this application under Cygwin= in > the same way as many others, which all run OK, The Cygwin DLL is the core DLL providing the POSIX environment (/usr/bin/cygwin1.dll). If you build a normal application under Cygwin, you link against the Cygwin DLL the usual way and that's fine. "at runtime dynamically" means, your application is a native, non-Cygwin binary and you try to load the Cygwin DLL at runtime via the Windows call LoadLibrary (kind of like dlopen()). Given your description that's not the case for you, so nothing to worry about. Just ignore this. But that gives me an idea. Assuming you don't link against this camera DLL, but rather use dlopen/dlsym to fetch and use the entry points to that DLL, does it work then? That would be another thing you could try. But I assume there's something simple going on. Try if one of my other points give a clue. You could also run your applications under strace or GDB... Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --hkxLWrKAgbGf75mf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWdCeAAAoJEPU2Bp2uRE+g4J8P/AoZh+J2nP0f69jKs7smFeMr bI+p+9lWBMp7SvqvPOmbWMaTF/ZKNdoa9IBC85xtlcEqjF9HWJ8Q/cJ8dMYtCsx6 BFbLKbaP58TffZ1h+b19ctSo4HPP4dCperJ4BwM5tPy6yTWiGjKlyTjnQHI6oQHn JnCGwXlIpTf1rAq7yF70YrcMboYpYGLTJgt1BT5ydh8r8wFNAztHmW9UpWztgOPd 0br6YJrBVa5hidozFZG12feaQRViLTtbtDSDc9EbkLTixtELkIMggaJ0OKab4oj5 tm7F+CzsEnZkLeRFxOLRYrwTjpXSPEl2QJLAb0NdR3Jgh0D77nCO9eWxIdqNlamE 2C9f89R+f4lDDlFagreBBqzypq0x32Mg03Zis7CSS75bXsmgGRLaWYBN6hJIGpJp +o3zqrG3zNCWMyxNDa6jW6sJu0U9NrPhHCQv5P37Ki3lhYXtZF6GtQOZaIyXgnz5 sTNuNz/ohk653PuA9v5GebzQ0JBi66QaIL59J9KP6LofQX/jSIIWhL2jIJ8c5voq 6c45TC9zWbMbdtmYmfS9yLDZl7TiylQ5d/++AOeSgMym1B6Im3AGIwj+rGXimlKS OmHog8c3gA322s5FlYrhrD71UbH1mDXdPuemzUK0Qbzf/9s7NX9DYjrrGj2asEhm Voz76hcbziGrjAnFsxao =FPHw -----END PGP SIGNATURE----- --hkxLWrKAgbGf75mf--