3 ms·
Recently I followed someone's instructions to build a small C++ project on Windows and spent like 5 hours trying to get the right clang and the right cmake and
by anonymoushn 4y ago
Recently I followed someone's instructions to build a small C++ project on Windows and spent like 5 hours trying to get the right clang and the right cmake and the right ninja to invoke each other. The worst issue involved seemed to be that if you install "MSVC build tools" then cmake will auto-detect that somehow and call the ninja installed by that instead of the one in your PATH, which will pass windows-style flags to the clang in your path which does not know what those are. "Install MSVC to get required dependences but do not install MSVC build tools to avoid anti-required anti-dependencies" was not in the instructions, of course.
- oblio 4y agoYou're going outside the beaten path with cmake and ninja. Op is probably talking about Microsoft compilers and build tools.
- anonymoushn 4y agoWhat is the Microsoft-approved way of configuring a project to be able to build on Linux and Windows?
- oblio 4y agoIt's Microsoft. There is no one "Microsoft-approved" way of building GUI applications for Windows (or anything else for that matter), and you're asking for cross platform stuff :-)) The grandparent's comment was pointing out that if you take the default VS setup, which is usually MSBuild, it's quite self contained. As long as you have the corresponding VS redist, you can pretty much pick up an old VS project (one created with VS) and build it. I'm taking even about stuff from 20 years ago. Cross platform projects use cross platform stuff, which are obviously not developed by Microsoft, so caveat emptor. By your logic because VS integrates with npm, the issues setting up npm projects are their problem :-p