I have an executable library (.EXE) to which a DLL library is linked. The DLL library is linked to the Rhino C++ SDK. I’ve narrowed it down, and linking the executable to this library when the dependency to the Rhino SDK is removed works perfectly.
Both are built under /MD /RTC1
and that uses MFC in a shared DLL and the Unicode Character Set.
The exe is basically a console subsystem for the unit tests and is also linked to GTest. The DLL is compiled with the following flags as well: -D_UNICODE -U_MBCS
with the following preprocessor macros: _AFXDLL, WIN64, _WINDOWS, NDEBUG, _USRDLL
. When I use an object from the DLL (an object to be tested from that library), and run the executable, the program crashes with the following error:
The program has exited with code -1073741502 (0xc0000142) 'DLL Initialization Failed'.
I’m running out of ideas as to why this is happening, is there anything specific about including a DLL library using the Rhino SDK in to a console executable? Thanks