Date: Sun, 12 Apr 2020 15:54:11 -0500 > From: Ben Clapp <ibenr****@gmail*****> > To: mingw****@lists***** > Subject: [Mingw-users] "Procedure Entry Point CloseHandle could not be > located" error with program compiled using MinGW > > 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" > It's not clear to me what changed to cause this error to occur. > Testing older versions of the software that were working at the time > result in the same error- > Debian Linux recently updated their MinGW packaging in their testing > branch (around late March 2020), so this could be related to the issue > (I'm developing on a Debian Linux system that is tracking the testing > branch). > > libgcc and libstdc++ are statically linked to the application; > dynamically linking them only changes the error about the entry point > from CloseHandle to _Unwind_Resume or _ZNSt6chrono3_V212system_clock3nowEv. > > As my code does not call CloseHandle() directly, I am confused as to > what the issue is or what I need to do to resolve the issue. > It seems as if when the application is being linked by the linker, it is > somehow referring to CloseHandle() as a func that should be defined > within the .exe program binary, as opposed to trying to look for > CloseHandle() inside kernel32.dll. > > 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? Have you checked to dates on the libgcc and libstdc++ files to see if they have been updated recently?