2

For a CI system and the developers in our team, I'd like to be able to use a specific version of a MSVC toolchain for native Windows builds.

The goal is to have a well-defined consistent build-environment for all developers and for the the CI system, so that we know what toolchain was used to build a SW.

Afaik, the MSVC compilers on Windows are installed with MS Visual Studio, and which version one uses probably depends on the version of Visual Studio and maybe the Windows version (7/8/10...).

On a Linux system, such a dedicated toolchain is typically provided as an archive and put under /opt, so it does not get affected due to system upgrades or the general Linux version/distribution (as opposed to /usr/bin/g++ et. al.)

  • How can I achieve this on Windows systems?
  • And is a Windows-docker-container an option or maybe the only option?
  • Windows docker container is only an option for the most recent Windows Server editions. Unfortunately, I'm a long ways removed from C/C++ toolchains to speak towards how to set that up. You may find that you need to set up a straight VM for C/C++ builds. – Berin Loritsch Jul 23 '19 at 19:30
  • It's been a long time since I had to work with MSVC++, but as far as I remember, all projects are usually set to a specific toolset/toolchain and those toolchains can be installed as standalone (no VS) packages. So with few initial preparatory/install/build scripts, there should be no issues with having a (in no way ideal) but basically the same consistent environment on dev/build machines. But obviously... – Eugene Podskal Jul 23 '19 at 19:42
  • for really reliable reproducible environments you will probably have to go fully containerized/VM. Hadn't tried that, so can't really give any practical advice. – Eugene Podskal Jul 23 '19 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.