I am following the guide here to get a project up and running: https://github.com/juce-framework/JUCE/blob/master/docs/CMake%20API.md
I want to write code in Sublime Text and use its build system to run ninja. This is my go-to workflow and it works great on other projects (unrelated to JUCE).
I successfully installed JUCE as outlined, and created the build tree for my project with this command:
-cmake -Bbuild -G Ninja -DCMAKE_PREFIX_PATH=“A:/Audio/JUCE”
I will note that after the build kept giving me errors about mutexes, I found that I needed to run VS’s vcvars64.bat to get the build tree to use the right compiler instead of my default mingw (which I thought would work?). Anyways, so it generates properly now. When I run it with ninja within the same windows cmd context that I just created the build tree with, it builds fine and I run the exe to see the hello world window. But, if I close cmd and reopen it and try to run ninja again (or run it in ConEmu, or run it in Sublime Text’s build system), I get this error:
A:\Audio\JUCE\include\JUCE-7.0.8\modules\juce_core\system/juce_StandardHeader.h(50): fatal error C1083: Cannot open include file: ‘algorithm’: No such file or directory
ninja: build stopped: subcommand failed.
I imagine “algorithm” is arbitrary here and that the point is that it can’t find the general c++ includes. I don’t understand why this happens after I reopen cmd or use any other system to run the ninja build command. Everything is exposed to the same system path. I’ve tried rerunning the vcvars64.bat again beforehand, I’ve tried restarting my computer, I’ve ensured that cmake, gcc, and everything else is up to date, I’ve installed every relevant c++ package from the VS installer, I’ve perpetually deleted the build folder and tried again, I run cmd in administrator… not sure what to do now. Any help?