On Thursday 30 April 2020 11:29:47 Pali Rohár wrote: > On Thursday 30 April 2020 17:22:52 Liu Hao wrote: > > 在 2020/4/30 17:14, Pali Rohár 写道: > > > > > > So problem is only with 80, not 90. > > > > > > Anyway, that error message is issued by msvcr80.dll library itself, so I > > > think it could be possible to do some link-time workaround in mingw-w64 > > > or gcc to make msvcr80.dll happy. > > > > > > > I am not clear about details about this error. > > Me neither, I just saw in debugger that when error message was printed, > caller in stacktrace was msvcr80.dll. So I though that there could be > some init/workaround to "skip" that check even when manifest is not > provided. > > But I do not have PDB debug symbols for msvcr80 library to see exactly > what and when issue that fatal error message. And without it, it is > probably impossible to figure out details about this fatal error message.
Source code of msvcr80 init routines is available in Visual Studio 2005 installation and also on some random internet sources, e.g.: https://github.com/leelwh/clib/blob/master/c/crtlib.c It can be seen that _check_manifest() function is responsible for this check and based on its result is either thrown that error message or not. Looking at the code, there is basically no way how to avoid doing that check. The only way is to provide needed manifest file. Interesting is that there is #ifdef compile time check to disable that _check_manifest(), but only at compile time. Similarly source code of msvcr90 init routines is available in Visual Studio 2008 installation or at random internet sources, e.g.: https://github.com/stanfordzhang/vc9crt/blob/master/src/crtlib.c And routine is basically same. The remaining issue is why it passed my tests with msvcr90.dll, but not with msvcr80.dll. I guess this is because Microsoft distributed two versions of same library. One with enabled manifest check and one with disabled, as check can be disabled at library compile time. So the best usage of msvcr80.dll or msvcr90.dll is try to build with disabled manifest check. -- Pali Rohár pali.ro...@gmail.com _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public