Re: "Procedure Entry Point CloseHandle could not be located" error with program compiled using MinGW

Keith Marshall <[email protected]> Mon, 13 Apr 2020 21:42:05 +0100
Newsgroups gmane.comp.gnu.mingw.user
Organization MinGW.org Project
Message-ID <[email protected]>
Hi Ben,

On 12/04/2020 21:54, Ben Clapp wrote:
> Hi all, I have a 3D program using SDL2 and Vulkan that I've developed
> on Linux, but also cross-compile for Windows. I have cross-compiled
> the application and run the application on Windows in the past
> without issue.>
> Recently, however, I get the following error when running the
> application on Windows:
> "The procedure entry point CloseHandle could not be located in the
> dynamic link library [name_of_program].exe"

That's weird.  As you've correctly indicated later, CloseHandle() should
be resolved to a KERNEL32.DLL reference, and not to your executable.

> [...snip...]
> 
> Can someone give some insight as to what exactly is going on here, and
> what steps can be taken to troubleshoot and resolve the issue?

You don't really provide enough detail, for anyone to do that.  You have
indicated that you are using Debian's pre-packaged cross-compiler tools,
which we do not formally support.  I too cross-compile all of my MinGW
code, in my case on Arch-based Manjaro Linux, but using my own build of
mingw32-gcc, rather than the Arch-packaged offering.  I suspect, as you
have indicated that you do, that Debian may have messed up their latest
cross-compiler package, but right now, that's pure speculation.  If you
reduce your issue to a SSCCE, I would be willing to check if it can be
successfully built with my mingw32-gcc tools.

-- 
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F

_______________________________________________
MinGW-Users mailing list
[email protected]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.osdn.me/mailman/listinfo/mingw-users
Also: mailto:[email protected]?subject=unsubscribe
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEwZ7AGBVH3lDh1I9TwK02xjR+Wj8FAl6Uzp0ACgkQwK02xjR+
Wj83uRAAgIKdgTAgovf3Qa6TOQaidY70NrZnT9xSWkoM41usQ0GOrwKBnvXQJX4l
O9/nOdtFNcY2UP1sU79gjLZJyt+fexWnGUxfDqGjNOTYilu/MZg6s7wD/kJ8e4Q2
Zq4ZOVETUiMhT59R5B3n7ui+0cByTTjXztU2D/sOlgmCBfgYJ3cZyLyP//hIJo2G
yOkHmKknZO0cPy/+70PgHvmOxTy6+YiuCz+qpjQHLgpen718Ws3biZ/oDAGxaebg
fBICnBg4+bqGPRn9W1zT9t95d5529MJI2Jhuw2bF36pq3/9TuDl/1Gu69fOX3owF
FvA9lCrLyPCJ/EeRIimlMer/Ewb3EEFnPrM8S5SLxgmGmn3gkXajVvHOtd20vlQb
9A82j63VegsMMIi3qx6vhadAWh9zpkwMotHwL07KFzkLX/KZu3x/xxY/1eiuHutE
vgbIUkn/P7dljHK18oBdm7XX8eOn0enAN6B8F9d9XEDUtP2ZySy260P162pjdEx6
8qbRoBPdy2RKai1k9uwQ3ai37O9dmGzfNxFSY0kWsps47GTG+YtxemWLMbcE84/M
7D8aCzfqwq17HcVq9f8RYMmp8WlXKvtDfDs7EcJfx4mxLgW7v/HfpS1vMeyqIDOZ
YS2woBKyv9zwQl0v+vM447kubMG/3SwFmIt5vGyFHOHTabBHlm8=
=+tVF
-----END PGP SIGNATURE-----