在 2026-1-27 02:12, Pali Rohár 写道:
In our case, error happened with static linked libstdc++ and my idea is
that statically linked libstdc++ is calling vsnprintf function (which is
in libmsvcrtNN.a compiled from mingw-w64-crt/stdio/vsnprintf_alias.c)
and it calls the __ms_vsnprintf function (which is in libmingwex.a
compiled from mingw-w64-crt/stdio/vsnprintf.c).

My idea was that libmsvcrtNN.a could not call libmingwex.a functions due
to linking order, so I suggested to move the __ms_vsnprintf function
from the libmingwex.a to all libmsvcrtNN.a and libucrt.a libraries.

Right, although some functions are linked statically in libmsvcrt.a, they mean to work around the incompatibilities among CRT DLLs, and the library itself should still behave as an import library. Calling functions from Windows DLLs is mostly fine, but all files should probably be built with `-D__USE_MINGW_ANSI_STDIO=0`.



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to