Get started… / Installation Steps#
See also
Step-by-Step Installation Manual
Prerequisites#
Visual Studio Code or Visual Studio 2019 or higher
Git
CMake (at least version 3.20)
GCC Compiler (version 14.2.0)
Installation Steps#
Step 1: Install Visual Studio Code / Visual Studio#
Download Visual Studio Code 2019 or Visual Studio 2019 (or higher):
Go to the Visual Studio Code / Visual Studio website.
Download the installer for your operating system (Windows, macOS, or Linux).
Install Visual Studio Code 2019 or Visual Studio 2019:
Run the downloaded installer and follow the on-screen instructions to complete the installation.
Step 2: Install Git#
Download Git for Windows.
Go to https://git-scm.com/download/win — the download should start automatically.
Run the Installer.
Double-click the downloaded .exe file..
Follow the Setup Wizard:
Choose default options unless you have specific preferences.
Make sure “Git from the command line and also from 3rd-party software” is selected.
Choose your preferred editor (e.g., Vim, Notepad++, VS Code).
Leave the rest of the settings as default and finish the installation.
Verify Installation:
Open a terminal or command prompt.
Type
git --version
and press Enter.
Open Terminal and run:
sudo apt update
sudo apt install git
Verify Installation:
Open a terminal or command prompt.
Type
git --version
and press Enter.
Configuration git:
git config –global user.name “Your Name”
git config –global user.email “you@example.com”
git config –list [to verify the settings]
During the building the project the user must be logged in into git
Step 3: Install CMake#
Download CMake 3.20 or higher:
Visit the CMake download page.
Download the installer for your operating system.
Install CMake:
Run the installer and follow the on-screen instructions.
Ensure that you add CMake to your system PATH during the installation process.
Verify CMake Installation:
Open a terminal or command prompt.
Type
cmake --version
and press Enter.Ensure the version is at least 3.20.
Step 4: Install GCC Compiler#
Download GCC Compiler:
For Windows, you can use MinGW-w64. See MinGW Installation.
For Linux, use your package manager (e.g.,
sudo apt-get install gcc
for Debian-based distributions).
Install GCC Compiler:
Follow the instructions specific to your operating system to install GCC.
Verify GCC Installation:
Open a terminal or command prompt.
Type
gcc --version
and press Enter.Ensure the version is 14.2.0.
Step 5: Install Visual Studio Code Extensions#
Tip
There are several visual studio extensions, which may be helpful. Some we see as recommendated, some are more optional.
Recommended Extensions:
C/C++
CMake tools
Optional / helpful extensions:
Git Graph
Git History
Step 6: Clone Your Project Repository#
Open Visual Studio Code.
Open the Terminal:
Go to
View > Terminal
or press `` Ctrl+` ``
Clone the Repository:
In the terminal, type git clone <your-repository-url> and press Enter.
Replace <your-repository-url> with the URL of your project repository.
Step 7: Build the Project with CMake#
Open Visual Studio Code.
Navigate to the Project Directory.
Go to
File > Open Folder...
and select<your-project-directory>
Replace
<your-project-directory>
with the path to your project directory.
Configure & Build:
In the CMake extension go to
Configure
section and select the required Preset.In the CMake extension go to
Build
and trigger a build
Run executable:
After the compilation is complete, you can run the executable generated in the build directory. The executable can be found in
<your-project-directory>/build/<selected-compiler-platform>/bin
Run tests:
During the build also the tests are included. The tests can be found in
<your-project-directory>/build/<selected-compiler-platform>/tests/bin
Navigate to the Project Directory: - In the terminal, type
cd <your-project-directory>
and press Enter. - Replace<your-project-directory>
with the path to your project directory.Run CMake: - In the terminal, type
cmake . --preset <your-preset-name>
and press Enter. - Replace<your-preset-name>
with the preset you want to use. - e.g.cmake . --preset gcc_w64_unix_debug
. - The available presets can be found in fileCMakePresets.json
- This will configure the project and generate the necessary build files.Build Project: - In the terminal, type
cmake --build . --preset <your-preset-name>
and press Enter. - Replace<your-preset-name>
with the preset you want to use. - e.g.cmake --build . --preset gcc_w64_unix_debug
. - The available presets can be found in fileCMakePresets.json
- This will compile the project using the selected compiler.Run executables:
After the compilation is complete, you can run the executable generated in the build directory. The executable can be found in
<your-project-directory>/build/<selected-compiler-platform>/bin
Run tests:
During the build also the tests are included. The tests can be found in
<your-project-directory>/build/<selected-compiler-platform>/tests/bin
Note
<output-folder>/examples/bin
and can be executed:Hint
That’s it! Your project should now be compiled and ready to run. If you encounter any issues, feel free to ask for help.
Follow Up Steps#
After successful setting up the build environment, building the VAPI Framework and executing the executables the follow up step would be to build and take a closer look at the examples.
See Examples for the documentation of the examples.
Open Visual Studio Code.
Navigate to the Examples Directory.
Go to
File > Open Folder...
and select subfolder<your-project-directory>/examples
Replace
<your-project-directory>
with the path to your project directory.
Run CMake.
Do the same configuration and build steps as in Step 6.
Run executable:
After the compilation is complete, you can run the test examples generated in the build directory. The executable can be found in
<your-project-directory>/build/<selected-compiler-platform>/examples/bin
Note
<output-folder>/examples/bin
and can be executed:Do the same with subfolder <your-project-directory>/framework_tests
which contains tests for the auto generated code.
Create Your Own Project / Working Space#
Attention
It is recommended to create a new root folder for your own projects. Do not add your code below the existing framework as the structure is not finalized yet. It will change in future!
To setup an own working space is easy:
Create the environment variables which are pointing the framework header files and binaries
SDV_FRAMEWORK_RUNTIME(…/build/<compiler>/bin)(sdv_control can be found there)The environment variable SDV_FRAMEWORK_RUNTIME needs to be pointing to the SDV V-API framework location!SDV_COMPONENT_INSTALL(…/build/<compiler>/bin)(sdv_packager can be found there)The environment variable SDV_COMPONENT_INSTALL needs to be pointing to the SDV V-API component installation location!SDV_FRAMEWORK_DEV_TOOLS(…/build/<compiler>/bin)(sdv_dbc_util can be found there)The environment variable SDV_FRAMEWORK_DEV_TOOLS needs to be pointing to the SDV V-API development tools location!SSDV V-API framework and SDV V-API development tools may be the same.SDV_FRAMEWORK_DEV_INCLUDE(…/export)The environment variable SDV_FRAMEWORK_DEV_INCLUDE needs to be pointing to the SDV V-API development include files location!
SDV_FRAMEWORK_RUNTIME …./build/msvc_x64_x64_ninja_debug/bin SDV_COMPONENT_INSTALL …./build/msvc_x64_x64_ninja_debug/bin SDV_FRAMEWORK_DEV_TOOLS …./build/msvc_x64_x64_ninja_debug/bin SDV_FRAMEWORK_DEV_INCLUDE …/export
Copy the tmp_project folder to any place you like. The tmp_project folder contains a CMakeLists.txt file and a subfolder already. Start your project directly in the subfolder. Use tmp_project folder as root folder.
Hint
Keep path names short. If you rename the subfolder or add more folders, then you have to update the CMakeLists.txt file in your root folder accordingly.