1

I am trying to build on Windows using CMake/Ninja and CLANG. It still require me to install Visual Studio... Is there a way to compile on C++ code on Windows without installing Visual Studio?

I switched to Ninja build instead of MSBUILD but visual studio is still required

  • The question lacks of debugging info. Have you tuned a cmake toolchain for using clang? – 273K Mar 05 '23 at 18:26
  • 1
    Yes I have been using CMake and Ninja using Linux. I have code that doesn't rely on any Windows features but I need to run on Windows. I am just looking to build the same on Windows with with clang. What debugging information can I provide? I can try to uninstall vs and try again. Thanks – Royce Strike Mar 05 '23 at 18:29
  • 1
    If yes, then please show your toolchain file. Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: [mcve]. – 273K Mar 05 '23 at 18:34
  • 1
    @RichardCritten Thank you. Yes it does. It says that CLANG needs either Visual Studio or MINGW. I guess Visual Studio code is required in my case. – Royce Strike Mar 05 '23 at 18:36
  • @273K Got it. Will keep that in mind for my future questions. Thank you. – Royce Strike Mar 05 '23 at 18:37
  • 1
    Use "Build Tools for Visual Studio 2022" to not have to install visual studio: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022 – Artyer Mar 05 '23 at 18:48
  • @Artyer Wow I was not aware of a download just for build tools. Thank you so much. – Royce Strike Mar 05 '23 at 18:51

0 Answers0