How to make fat binary on windows (WinAPI + LDC)
Suliman
evermind at live.ru
Sat Nov 8 12:00:33 UTC 2025
Retelling from the grid of my torments:
Problem Summary:
1 ABI Incompatibility: LDC on Windows compiles D runtime
only for MSVC ABI, while the GUI project uses MinGW GCC with a
different ABI (different symbol naming and calling conventions).
2 D runtime not embedded: When building a static library via
ldc2 -lib, D runtime symbols (_d_allocclass etc.) remain
unresolved references, not included in the .lib file.
3 MinGW runtime doesn’t build: Attempt to rebuild D runtime
for MinGW failed—LDC sources require patches for MinGW target
support (error “Unsupported platform”).
4 Linking problem: MinGW linker (ld) cannot properly handle
MSVC .lib files, and MSVC linker requires compiling C code with
/TC flag, conflicting with existing code.
5 Fundamental limitation: On Windows, no simple way to
statically link C code (MinGW) with D library (LDC/MSVC) due to
different toolchains—must either build everything via MSVC or use
DLL.
This is resume of my attempts to build. DLL works fine but I want
fat binary
More information about the Digitalmars-d
mailing list