Ben Voigt [C++ MVP] wrote:
Hello again and thank you for your answer. I tried to do debug as
you suggested. Now the debugger stops on line 109 of file
atonexit.c: retval = __dllonexit(func, &onexitbegin, &onexitend);
This is a LOT more useful. It looks like the problem is with global
variable or members of a global variable afxModuleState, and
registering destructors to automatically run.
I think whatever you did to "fix" VS2005 is causing the trouble. Can you
undo that, probably by making sure than the entry point name
is not specified in the project properties?
Hello. I tried to remove these "fixes", but the application still
crashes at the same point.
I discovered one difference in the project settings for
GcpsDotNetApi.dll between debug and release modes. In release mode the
"/NOENTRY" option was given to the linker, whether this was not done
in debug mode.
I tried to remove this option in release mode, but then I do not
manage to link this DLL any more due to the following error:
mfcs80.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined
in MSVCRT.lib(dllmain.obj)
runtime library settings (i.e. /MT and whatever the equivalent is for "Use