On Thursday 30 April 2020 10:17:55 Liu Hao wrote:
> 在 2020/4/30 2:31, Pali Rohár 写道:
> > On Wednesday 29 April 2020 22:20:57 Liu Hao wrote:
> > 
> >     The application failed to initialize properly (0xc0000142). Click OK to 
> > terminate application.
> > 
> > 
> > When I tried to link with -lmsvcr90 and run it on same box, it works
> > fine and prints hello world as expected.
> > 
> > I compiled mingw-w64 from git master, so maybe something with
> > initialization of msvcr80.dll is broken in mingw-w64?
> > 
> 
> IIRC MSVCR80 and 90 require some magic .manifest resource file be linked
> into the main executable (typically you compile resources with WINDRES
> into .o files and link them along with others), otherwise it just fails
> at load time.

I already tried to find some information about it on internet and seems
you are right.

But interesting is that binary linked to msvcr90.dll is working fine
without providing any manifest resource file. So either mingw-w64 must
do some "magic" to workaround this problem for MSVCR90 or those manifest
files are needed only sometimes and not always.

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.

-- 
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

Reply via email to