CopperSpice Overview
Building for Windows (MSVC)

This following information pertains to building CopperSpice and developing C++ applications on Windows using Visual Studio.

Installing MSVC

Download and install Visual Studio 2019 community edition version 16.6.x or newer.

Support for Visual Studio 2017 has been discontinued. It was discovered and confirmed by Microsoft their compiler was unable to handle valid C++11 and C++17 standards compliant code. These issues were resolved by the Microsoft development team however is was not back ported to prior versions of MSVC.

We are grateful for their willingness to continue compiler improvements by using CopperSpice in their conformance testing.

Building CopperSpice with MSVC

The following information are the highlights for building the CopperSpice libraries using MSVC. Developers should be familiar with the basic usage and layout of the Visual Studio IDE.

  • To build the CopperSpice libraries use the steps shown below.

    1. Import the CopperSpice source code and create a new project

      • Using the source located on our CopperSpice download page

        1. Select File, Open, CMake
        2. Download either the Tar or Zip file from our CopperSpice download page and extract the files
        3. Navigate to the source and select the CMakeLists.txt file located in the route folder

      • Using the source from the CopperSpice GitHub repository

        1. Select View, Team Explorer
        2. Select Projects, New Repository
        3. Select Clone option
        4. Enter the URL
        5. Click on the "clone" button

    2. Once the copperspice project has been opened, highlight the CMake menu option (located on the menu bar) and then select "Build All"
  • To change the build from Debug to Release mode.

    1. Highlight the CMake (located on the menu bar) and then select the "Change CMake Settings" option
    2. Select "copperspice"
    3. In the editor window change from Debug to Release mode as needed
      "configurationType": "Debug" to "configurationType": "Release"
    4. In the editor window modify the command line arguments as needed, adding "-k 0" will force the compile to keep going even when errors are encountered
      "buildCommandArgs": "-v -k 0"
If CopperSpice is built in Debug mode on MSVC you must also build your application in Debug mode.

Installing with MSVC

  • The following steps show how to configure MSVC to install to a specific path.

    1. Highlight the CMake menu (located on the menu bar) then select the "Change CMake Settings" option
    2. Click on "copperspice"
    3. In the editor window add or change the path for CMAKE_INSTALL_PREFIX to YOUR_INSTALL_PATH
    4. Set an environment variable called CMAKE_PREFIX_PATH to YOUR_INSTALL_PATH