logoalt Hacker News

dboonyesterday at 4:14 PM1 replyview on HN

Yes, of course. Unfortunately, sometimes you need to link to Windows binaries and therefore need to compile against the Windows ABI.


Replies

1718627440yesterday at 4:46 PM

From https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html

> -mabi=name Generate code for the specified calling convention. [...] The default is to use the Microsoft ABI when targeting Microsoft Windows and the SysV ABI on all other systems.

> -mms-bitfields Enable/disable bit-field layout compatible with the native Microsoft Windows compiler. [...] This option is enabled by default for Microsoft Windows targets.

Doesn't this work in practice, due to bugs?

show 1 reply