I am trying to compile this on Windows: GitHub - cianoc/cian-plugins
I am familiar with the process on Linux, but am not sure how do it on Windows. The documentation I have found online for compiling C++ on Windows seems unclear and inconsistent to me. Can anyone please offer me some guidance?
You can either use MSVC or GCC/Clang. For the latter, I would recommend to use Msys2 (https://www.msys2.org/).
First you have to pick the appropriate CMake generator (Visual Studio <version> <year>
for MSVC resp. Unix Makefiles
for Msys2). If you use cmake-gui
, it will open a dialog where you can select the desired generator when you configure the project for the first time.
Then you just run cmake .. <options>
and cmake --build . --config Release --target install
from within your build folder as usual. If you use a Visual Studio solution, you can also open it in Visual Studio and build it from there.
If you donât have Msys2 installed already, Visual Studio might be the easier way.
Thanks for the help, but I think Iâm missing some details.
I open cmake-gui > add entry > enter SC_PATH for name > enter c:/users/owner/git/supercollider for value > configure > visual studio 16 2019 > finish > generate > open developer command prompt for VS 2019 > cd c:\users/owner/git/cian-plugins-master
> mkdir build
> cd build
> cmake -DSC_PATH="c:/users/owner/git/supercollider" -DSUPERNOVA=ON ..
> cmake --build . --config Release --target install
The error message I get is âError: could not load cacheâ
If I do cmake --build . --config Release --target install
as the last step, I get:
MSBUILD : error MSB1009: Project file does not exist.
Switch: install.vcxproj
I also tried with MSYS64, but I donât even complete the first step.
In cmake-gui
, are you sure that âWhere to build the binariesâ points to the âbuildâ folder? My suspicion is that you accidentally created the project files in the top level source folder.
cmake -DSC_PATH="c:/users/owner/git/supercollider" -DSUPERNOVA=ON ..
This step is unnecessary if you have already configured/generated the project with cmake-gui
. After all, the point of cmake-gui
is that you donât have to use the command line
It doesnât matter; I still get:
MSBUILD : error MSB1009: Project file does not exist.
Switch: install.vcxproj
Dunno. But you can just open the Visual Studio solution and build from there.
Ah well, the project doesnât have an install target⌠Just run cmake --build . --config Release
and install manually.
BTW, you donât have to run CMake from the Developer Command Prompt, you can use the regular command line and CMake will automatically invoke the correct tools.
Thanks! Got it working. Turned out to be much more simple than I thought.