CopperSpice Overview  1.5.1
Building for MSVC

This information pertains to building CopperSpice for developing applications on Windows using the Microsoft Visual C compiler. CopperSpice and your applications must be built using the CMake systen.

Installing MSVC

Download and install Visual Studio community edition version 15.8.1 (8/8/2018) or newer.

Building with MSVC

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

  • The folowing steps are used to ensure MSVC is fully installed for C++ development. This is only required after the initial MSVC installation.

    1. Open the Windows control panel
    2. Select "Programs and Features"
    3. Highlight "MSVC"
    4. Select the "Change" button which is located on the tool bar just above the list of programs
    5. Uncheck and then check the option "Desktop Development with C++"
    6. In the "Individual Components" list check the box next to "Visual C++ tools for CMake and Linux"
  • 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    https://github.com/copperspice/copperspice.git
        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"
Note
It is important to be aware that if CopperSpice is built in Debug mode you must also build your application in Debug mode.

Installing with MSVC

  • The following stesp 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
      "cmakeCommandArgs": "-DCMAKE_INSTALL_PREFIX=YOUR_INSTALL_PATH"
    4. Set an enviornment variable called CMAKE_PREFIX_PATH to YOUR_INSTALL_PATH