"exited with code -1073741701" when executing a C program built in VS2019 with libpq and OpenSSL libraries

Francisco Martinez 21 Reputation points
2020-11-04T20:37:24.987+00:00

Hi all,

I have written a program in C using VisualStudio 2019. This programs connects to a PostGreSQL DB by means of libpq libraries.

All the needed libraries and DLLs are installed and included in the PATH.

However, the execution of the program crashes.

When I try to debug it from VS2019 I got this error:

myprogram.exe (process 5456) exited with code -1073741701.

In the VS2019 output window I can see these messages:

'myprogram.exe' (Win32): Loaded 'C:\Windows\System32\libssl-1_1-x64.dll'.
'myprogram.exe' (Win32): Loaded 'C:\Windows\System32\libcrypto-1_1-x64.dll'.
'myprogram.exe' (Win32): Loaded 'C:\Windows\System32\libintl-8.dll'.
'myprogram.exe' (Win32): Unloaded 'C:\Windows\System32\libintl-8.dll'
'myprogram.exe' (Win32): Loaded 'C:\Windows\System32\libintl-8.dll'.
'myprogram.exe' (Win32): Unloaded 'C:\Windows\System32\libintl-8.dll'

The thread 0x754 has exited with code -1073741701 (0xc000007b).
The thread 0x3a00 has exited with code -1073741701 (0xc000007b).
The program '[5456] myprogram.exe' has exited with code -1073741701 (0xc000007b).

I have double checked that libintl-8.dll is present in C:\Windows\System32\, and also reinstalled it with no results.

I would appreciate very much any help on this.

Thanks and Regards

Developer technologies | Visual Studio | Debugging
Developer technologies | C++
{count} votes

Accepted answer
  1. RLWA32 49,636 Reputation points
    2020-11-05T01:18:37.02+00:00

    It appears to me that "myprogram.exe" is a 64-bit application. My best guess is that the version of libintl-8.dll that is installed in the System32 folder is actually a 32-bit dll. That would be why that dll is loaded and then unloaded with myprogram.exe failing to start and exiting immediately with the 0xC000007b error code.

    You can verify the bitness of libintl-8.dll with the dumpbin utility.
    Run the command dumpbin /headers on the libintl-8.dll that is installed. The output will show whether the version you have installed is a 64-bit dll or a 32-bit dll.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.