Building a Project Using the SDK
Overview
The provided example applications can serve as a guide for creating a new project using the BMC C++ SDK. The examples are located in the examples directory, and the instructions to build and execute them are similar to those related with building the C++ SDK Library.
Step by Step Guide
Here is a step-by-step guide on how to build a project that uses the library:
Navigate to the directory containing the project that uses the BMC C++ SDK.
Ensure that the development environment is properly set up. To do this, follow the instructions in the Environment Setup section of our guide.
Create a
CMakeLists.txtfile in the root directory of the project. An example of this file can be found below.Create a
builddirectory inside the project.Navigate to the
builddirectory.Configure CMake:
Linux/macOS
cmake -DLIBRARY_PATH=[Path to the dir containing the library] -DINCLUDE_PATH=[Path to the dir containing the include files] ..Windows 64
cmake -DLIBRARY_PATH=[Path to the dir containing the library] -DINCLUDE_PATH=[Path to the dir containing the include files] .. -G "Visual Studio 17 2022" -A x64Windows 32
cmake -DLIBRARY_PATH=[Path to the dir containing the library] -DINCLUDE_PATH=[Path to the dir containing the include files] .. -G "Visual Studio 17 2022" -A win32
Build with CMake:
cmake --build . --config ReleaseOn Windows, verify that within the
builddirectory, there is aRelease(orDebug) directory containing the project's executable. On Linux/macOS, look for the executable in thebuilddirectory.
CMake Example for Building Applications
Below is an example of a CMakeLists.txt file for building a sample application (i3c_cccs) that uses the BMC C++ SDK as a dynamic library:
Last updated