I was trying to build my project for both 32 and 64 bits. After a lot of work (I’m not familiar with developing on Windows) I figured out I should use the VS compiler (cl.exe), and to be able to compile to both 32 and 64 bits I should run the vcvars32.bat and vcvars64.bat script (inspired by this).
However, even though visualstudio2017buildtools is installed by default, it seems this bat files are not included. I managed to get them by installing more packages with choco install -y visualstudio2017community visualstudio2017-workload-nativecrossplat. This worked in the end (see commit), but it takes about 10 minutes for Travis to run this (in comparison, the Linux and OSX builds take about 1 minute see here)
My question is: Is there a better and faster way to do this? This solution seems pretty hacky.
I’d also like an answer to this. I have a stupid simple build setup for my project right now - I’m basically just running cl.exe on windows and it produces an executable file.
I’m unable find any way to get the path to cl.exe or the vcvars64.bat script.
Creating a project for msbuild just to get this going seems overkill when I just need access to cl.exe.