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.
SDK_ROOTSpecifies 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
PATHThe 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:
%SDK_ROOT%\bin: Contains essential command-line executables.%SDK_ROOT%\lib: Contains libraries used by the SDK.%SDK_ROOT%\tools: Additional development tools and utilities.Note: Modifying the PATH can affect other applications. Be cautious and always back up your system's environment variable settings before making changes.
SDK_INCLUDEPoints 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_LIBSpecifies 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_DATAThis variable can point to directories containing data files, configuration files, or resources used by the SDK tools.
%SDK_DATA%
Example: %SDK_ROOT%\data
Environment variables can be set in several ways:
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.
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.
Ensure SDK_ROOT is set, and its bin directory is added to the system PATH.
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.
PATH: The order of directories in the PATH variable determines which executable is found first if multiple versions exist.Understanding and correctly configuring these environment variables is crucial for a smooth and efficient development workflow with the SDK.