Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Getting C++ Hello World working on Windows (a comedy & tragedy) (sdegutis.github.io)
6 points by 90s_dev 59 days ago | hide | past | favorite | 8 comments


This is so true. I have MinGW, WSL, MSYS, Clang, VSCode, and VS. I have to juggle between them. I also hate VS, it does way too much for you and you get a bunch of garbage IDE files. I imagine MS engineers in every meeting: "should we make this simple? Nah, let's just add several layers of unnecessary bullshit, yeah that sounds good."


see above, no VS involved

you can use Codelite, Ultimate++, or EclipseCDT


I have 3 envs on my Windows work laptop

1. PellesC => small C+win32 hobby

2. Msys2+mingw64 => main env for rust too

3. Clang-LLVM + Windows SDK + Cmake + jom (and Windows CRT from C3 install) => Works fine https://github.com/llvm/llvm-project/releases/download/llvmo...

(I use 3 for D too)

4. I would like to add to your guide compiling with OpenWatcom V2 (https://github.com/open-watcom/open-watcom-v2)

5. Cygwin they have latest GCC 15 in testing

6. Winlibs or equation.com mingw distros


In other words I'm very lost and in over my head.


see above.

would you like a guide for windows with method 3?

methods 2/4 should work out of the box

still I recommend you to give a go to latest D (dmd or ldc2) with method 3

(2 may work too)


I'm nervous about mingw or msys2 partly because I don't know if windows will look native or unixy (I want native dark mode title bars), partly because I already have Git for Windows installed which comes with bash and a bunch of other unix utilities so I don't want to install doubles of any of those, and partly because I'm just too tired to do the uninstall dance all over again with yet another potential setup.


You can use method 3 or (method 7) zig-cc

(personally I have both msys2 + and git-bash)

But I think method 3 is what you need.

BTW use UnigetUI (I configured with scoop/chocolatey/winget) to install cmake/jom

WindowsSDK, C3 (for the CRT) and clang-llvm you need to do by hand.

Then you are msys2-free

Maybe I need to do a dev-to/medium article for this.


Please do.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: