Martin Storsjö <[email protected]> wrote:
> On Fri, 20 Feb 2026, Kirill Makurin wrote:
>
>> When you configuring such a package with autoconf-like
>> checks, you'll run those tests against msvcrt.dll on the build system,
>> which is likely to be Windows 10/11, which has many functions not
>> available in ancient versions of msvcrt.dll. You'll build the project
>> and it'll run on the build system, but it may fail to load on old system
>> with older versions of msvcrt.dll.
>
> This is not true.
>
> When autoconf does a compile/link test, it links against the msvcrt import
> library in the form it is provided by mingw-w64. Whatever version of
> msvcrt.dll is available on the build system is entirely irrelevant; you
> may be cross compiling where there's no system msvcrt.dll at all. The only
> case it makes a difference is if the autoconf project is set up to do not
> just compile+link, but compile+link+execute tests, but that is rare.

This is exactly what leads to the situation that I've described.

mingw-w64's import library for msvcrt.dll exports symbols which are not 
available in old versions of msvcrt.dll. Compile+link tests will succeed 
regardless of system's msvcrt.dll, and the project will build without issues. 
Then, for a native build, running project's testsuite on the build system will 
likely show no issues - the system has recent enough msvcrt.dll. Later, if the 
image is run on system with some older version of msvcrt.dll, it may fail to 
load because it references a symbol that is not available in that msvcrt.dll.

- Kirill Makurin

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

Reply via email to