SDK Environment Variables

Environment variables are dynamic named values that can affect the way running processes will behave on a computer. This document outlines the essential environment variables used by the Software Development Kit (SDK) to locate and configure development tools, libraries, and build processes.

Key SDK Environment Variables

SDK_ROOT

Specifies the base directory where the SDK is installed. This variable is fundamental for locating all SDK components.

%SDK_ROOT%

Example: C:\Program Files (x86)\MySDK

PATH

The PATH environment variable is crucial. It tells the operating system where to find executable files. The SDK often adds its binary directories to the PATH so that you can run SDK tools from any command prompt location.

When setting up your SDK, ensure that the following directories are included in your system's PATH:

Note: Modifying the PATH can affect other applications. Be cautious and always back up your system's environment variable settings before making changes.

SDK_INCLUDE

Points to the directory containing header files (.h files) that are required for compiling code that uses the SDK. While often handled by the build system, explicitly setting this can be useful for custom build configurations.

%SDK_INCLUDE%

Example: %SDK_ROOT%\include

SDK_LIB

Specifies the directory where library files (e.g., .lib, .dll) used by the SDK are located. The linker uses this path to find necessary libraries during the build process.

%SDK_LIB%

Example: %SDK_ROOT%\lib

SDK_DATA

This variable can point to directories containing data files, configuration files, or resources used by the SDK tools.

%SDK_DATA%

Example: %SDK_ROOT%\data

Setting Environment Variables

Environment variables can be set in several ways:

Setting Variables in Windows Command Prompt

To set a variable for the current session:

set VARIABLE_NAME=variable_value

To set a variable permanently (system-wide or user-specific), you would typically use the System Properties dialog in the Control Panel.

Setting Variables in Linux/macOS (Bash/Zsh)

To set a variable for the current session:

export VARIABLE_NAME=variable_value

To set variables permanently, you would edit your shell's configuration file (e.g., ~/.bashrc, ~/.zshrc, ~/.profile).

Tip: For permanent changes in Windows, use the "Environment Variables" dialog accessible by searching for it in the Start Menu.

Common Configuration Scenarios

Scenario 1: Basic SDK Setup

Ensure SDK_ROOT is set, and its bin directory is added to the system PATH.

Scenario 2: Custom Library Paths

If you have custom library locations, you might need to add them to SDK_LIB or ensure your build system knows about them. Sometimes, a separate variable like MY_CUSTOM_LIBS is used and referenced by your project files.

Important Considerations

Understanding and correctly configuring these environment variables is crucial for a smooth and efficient development workflow with the SDK.