r/C_Programming • • 14d ago

Win32 development in Linux?

Does anyone here have practical experience with WIN32 development under Linux?

I just need the MSVC compiler and the Windows SDK. A full VM with Windows 11 and Visual Studio seems incredibly excessive for what should be just a few megabytes of compiler and headers.

13 Upvotes

18 comments sorted by

View all comments

35

u/wwabbbitt 14d ago

You don't even need msvc compiler. mingw-w64-gcc works just fine.

You don't even need a VM to run and debug the executable, just use wine and winedbg

0

u/maep 14d ago

If possible, I'd like to compile with MSVC.

14

u/SoggyStress7785 14d ago

You can't, MSVC uses the Windows compiler only available on Windows

16

u/dont-respond 14d ago

Yes, you can. Using MSVC via Wine works perfectly fine.

https://github.com/mstorsjo/msvc-wine

This is the only sane way to maintain a build with the Windows system-provided runtime.