On Mon Mar 9 10:58:18 2026 +0000, Alexandre Julliard wrote:
The plan is to only support MSVC mode for C++ Winelib builds. Mingw mode is already handled by Mingw. To elaborate on that, some msvcrt versions export those operators, but modern MSVC provides them in a statically linked form, like this patch does. Cross-module ABI compatibility depends on using compatible versions of these operators in the participating modules. It helps that the actual work is delegated to the C runtime, using the malloc/free allocators and _callnewh for the new handler (although that part would also require something like https://github.com/llvm/llvm-project/pull/150182 on the libc++ side to be fully correct).
With this solution, it would not be possible to use Wine built in mingw mode to build C++ code in MSVC mode, or the other way around. We support that for the C runtime, but unfortunately C++ makes it impossible. Then, as Alexandre said, there is little reason to use Winelib in mingw mode. We will still need to support mingw mode for building Wine itself, but there are good open source mingw toolchains available for non-Wine code. An open source solution for MSVC mode is not available, so allowing that with Winelib seems worth it. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10273#note_131604