Skip to content

Samples Compilation

On Linux

Prerequisites: An x86-64 computer with a Linux distribution installed, the cmake utility, the make utility and a C compiler.

  1. Create a build folder

mkdir build

  1. Go to this folder

cd build

  1. Launch cmake in debug mode

cmake -DCMAKE_BUILD_TYPE=Debug ..

(the last parameter point to the folder containing the CMakeLists.txt file of your target. In this case the one at the root of the repo including all the samples)

  1. Build the client and the server

make -j 4

( the -j 4 parameter enables four parallel compilations)

After making some modifications to the code, only the step 4 is required.

On Windows

Using Visual Studio Code

  1. Install the Microsoft C++ compiler as explained here: https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019
  2. Select the "Build Tools for Visual Studio 2019".
  3. In the Installer, make sure the following optional features are checked:
    • MSVC v142 - VS 2019 C++ x64/x86 build tools (Note that the version may differ)
    • Windows 10 SDK
    • C++ CMake tools for Windows
  4. Install Visual Studio Code from https://code.visualstudio.com/
  5. Launch Visual Studio Code.
  6. Go to the "Extensions" panel (Ctrl+Shift+X) on the left side.
  7. Install the "C/C++", "CMake", and "CMake Tools" extensions
  8. Open the folder containing the IOWA Samples ("File" menu -> "Open Folder..." or "Ctrl+K Ctrl+O")
  9. Open the CMake panel on the left side.
  10. On the top bar of the CMake panel, click on the icon "Configure All Projects".
  11. When prompted to select a kit, choose one of the Visual Studio Build Tools.
  12. On the top bar of the CMake panel, click on the icon "Build All Projects".
  13. Click on the sample of your choice.
  14. Right-click on the application and select "Run in terminal"

Using Visual Studio with C++ support.

Visual Studio version must be at least 2017 for the CMake support.

  1. In the Visual Studio menu bar, go to "File", "Open", "Folder". Select the IOWA Samples folder.
  2. In the "Solution Explorer" windows, right-click on "CMakeList.txt" and choose "Set as Startup Item".
  3. In the Visual Studio menu bar, go to "Build", "Build All"