Set up the TEN Framework development environment
Updated
Install the operating system packages and tooling required to build and run TEN Framework applications.
This guide explains how to set up your development environment for the TEN Framework. The TEN Framework supports Windows, Linux, and Mac, with Linux or Mac recommended.
Linux setup
For Ubuntu, install the following packages:
gcc- C/C++ compiler supported by TENclang- Alternative C/C++ compilerclang-format- Code formatting tool used during runtimeclang-tidy- Static code analyzercmake- Build system (version 3.13+)Python3- Required for Python bindingpytest- Used for integration testing
Mac setup
Required components:
- XCode
- CocoaPods
- Personal Account
Install dependencies:
brew install llvm googletest doxygen ninja clang-format
brew install include-what-you-useIf the brew-installed cmake is outdated, install from the official website and create a symbolic link:
ln -s /Applications/CMake.app/Contents/bin/cmake /usr/local/bin/cmakeIf cmake can't find clang-tidy, use:
ln -sf /usr/local/opt/llvm/bin/clang-tidy /usr/local/bin/clang-tidyFor language bindings, install:
brew install python golangWindows setup
Install these components:
- Visual Studio Community (up to 2022)
- Select clang-related tools
- Add clang binary path to the PATH environment variable
- cmake
- python
When installing cmake and python, avoid paths containing spaces.
Build system setup
ten_gn
TEN uses ten_gn as its build system (based on Google GN). The source code is in the core/ten_gn directory of the TEN Framework repository. Add this directory to your system PATH.
Docker containers
For a pre-configured build environment, we provide Docker files.
Ubuntu 22.04
Navigate to tools/docker_for_building/ubuntu/22.04 and run:
docker-compose up -d
docker-compose run ten-building-ubuntu-2204