CopperSpice Overview  1.5.2
Building for Windows (MSVC)

This information pertains to building CopperSpice and developing applications on Windows. CopperSpice and your applications can be developed using any editor such as VI, emacs, or Diamond and built using CMake or Autotools. For an integrated environment Visual Studio or Qt Creator can be used for development, building, testing, and deployment.

There are two supported approaches to build CopperSpice and your applications. You can use MSVC or MinGW.

  • If you are using MSVC refer to the information below

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 system.

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.

  • 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"
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 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