-
Notifications
You must be signed in to change notification settings - Fork 13
Development Setup
Lunae Mons Research edited this page Sep 1, 2025
·
1 revision
This guide helps you set up a development environment for SDR++CE on different platforms.
- C++ Compiler with C++17 support
- CMake 3.13 or later
- Git for version control
- vcpkg (Windows) or system package manager
- Visual Studio 2019/2022 or MinGW-w64
- vcpkg for dependency management
- Windows SDK (latest)
- GCC 8+ or Clang 10+
- Development packages for dependencies
- pkg-config
- Xcode or Command Line Tools
- Homebrew for dependencies
- macOS 10.15+ target
# Install dependencies
sudo apt update
sudo apt install build-essential cmake git pkg-config \
libfftw3-dev libglfw3-dev libvolk-dev \
portaudio19-dev librtaudio-dev libzstd-dev
# Clone repository
git clone https://github.com/LunaeMons/SDRPlusPlus_CommunityEdition.git
cd SDRPlusPlus_CommunityEdition
# Build
mkdir build && cd build
cmake ..
make -j$(nproc)# Install dependencies
brew install cmake fftw glfw volk portaudio rtaudio zstd codec2
# Clone repository
git clone https://github.com/LunaeMons/SDRPlusPlus_CommunityEdition.git
cd SDRPlusPlus_CommunityEdition
# Build
mkdir build && cd build
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 ..
make -j$(sysctl -n hw.ncpu)
# Create app bundle
../make_macos_bundle.sh . ../SDR++CE.appREM Install vcpkg
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg integrate install
REM Install dependencies
.\vcpkg install fftw3:x64-windows glfw3:x64-windows volk:x64-windows
.\vcpkg install portaudio:x64-windows rtaudio:x64-windows zstd:x64-windows
REM Clone and build SDR++CE
git clone https://github.com/LunaeMons/SDRPlusPlus_CommunityEdition.git
cd SDRPlusPlus_CommunityEdition
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=C:/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build . --config Releasecmake .. \
-DCMAKE_BUILD_TYPE=Release \ # Release/Debug/RelWithDebInfo
-DOPT_BUILD_BLADERF_SOURCE=ON \ # BladeRF support
-DOPT_BUILD_LIMESDR_SOURCE=ON \ # LimeSDR support
-DOPT_BUILD_HACKRF_SOURCE=ON \ # HackRF support
-DOPT_BUILD_RTL_TCP_SOURCE=ON \ # RTL-TCP support
-DOPT_BUILD_SPYSERVER_SOURCE=ON # SpyServer support# macOS
cmake .. \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
-DUSE_BUNDLE_DEFAULTS=ON # App bundle behavior
# Windows
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=vcpkg.cmake \
-DOPT_BUILD_MSVC_DLL=ON # MSVC runtime linking
# Linux
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DOPT_BUILD_DEBIAN_PACKAGE=ON # Debian package support# Linux
sudo apt install librtlsdr-dev libhackrf-dev liblimesuite-dev
# macOS
brew install librtlsdr hackrf limesuite
# Windows (vcpkg)
vcpkg install librtlsdr:x64-windows hackrf:x64-windows limesuite:x64-windows# Linux
sudo apt install libliquid-dev libcodec2-dev
# macOS
brew install liquid-dsp codec2
# Windows (vcpkg)
vcpkg install liquid-dsp:x64-windows codec2:x64-windowsCreate a development workspace:
mkdir sdrpp-modules && cd sdrpp-modules
# Create module template
mkdir my_module && cd my_moduleUse this CMakeLists.txt template:
cmake_minimum_required(VERSION 3.13)
project(my_module)
# Find SDR++CE installation
find_path(SDRPP_INCLUDE_DIR
NAMES module.h
PATHS /usr/include/sdrpp
/usr/local/include/sdrpp
${CMAKE_SOURCE_DIR}/../core/src)
if(NOT SDRPP_INCLUDE_DIR)
message(FATAL_ERROR "SDR++CE headers not found")
endif()
# Module source
add_library(my_module SHARED src/main.cpp)
target_include_directories(my_module PRIVATE ${SDRPP_INCLUDE_DIR})
# Install
install(TARGETS my_module DESTINATION lib/sdrpp/plugins)Install recommended extensions:
{
"recommendations": [
"ms-vscode.cpptools",
"ms-vscode.cmake-tools",
"vadimcn.vscode-lldb",
"ms-vscode.hexeditor"
]
}Configure .vscode/settings.json:
{
"cmake.buildDirectory": "${workspaceFolder}/build",
"cmake.generator": "Unix Makefiles",
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"C_Cpp.default.cppStandard": "c++17"
}- Open Project: File → Open → Select SDR++CE root directory
- CMake Settings: File → Settings → Build → CMake
- Toolchains: Configure compiler and debugger paths
- Run Configurations: Add configurations for different build types
- Open Folder: File → Open → Folder → Select SDR++CE directory
- CMake Settings: Project → CMake Settings → Configure
- vcpkg Integration: Ensure vcpkg toolchain is configured
Create .gdbinit in project root:
set print pretty on
set confirm off
handle SIGPIPE nostop noprint passcmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="-fsanitize=address -g"# Install valgrind
sudo apt install valgrind
# Run with memory checking
valgrind --leak-check=full --show-leak-kinds=all ./sdrpp_ce# Linux
sudo apt install libgtest-dev
# macOS
brew install googletest
# Add to CMakeLists.txt
find_package(GTest REQUIRED)
add_executable(tests test/test_main.cpp)
target_link_libraries(tests GTest::GTest GTest::Main)# Build tests
cmake .. -DOPT_BUILD_TESTS=ON
make tests
# Run tests
./testsCreate .github/workflows/build.yml:
name: Build
on: [push, pull_request]
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt install cmake libfftw3-dev libglfw3-dev
- name: Build
run: |
mkdir build && cd build
cmake ..
make -j$(nproc)# Ensure core headers are in include path
export CPLUS_INCLUDE_PATH="/path/to/sdrpp/core/src:$CPLUS_INCLUDE_PATH"# Linux
sudo apt install libfftw3-dev
# macOS
brew install fftw
# Windows
vcpkg install fftw3:x64-windows# Linux
sudo apt install libgl1-mesa-dev
# macOS - included with Xcode
# Windows - included with Windows SDK- Use
RelWithDebInfoinstead ofDebugfor better performance - Disable expensive debug checks in hot paths
- Monitor with
htopor Task Manager during development - Use memory profilers to identify leaks
# For development, disable code signing requirement
sudo spctl --master-disable- Add SDR++CE build directory to antivirus exclusions
- Some security software flags development builds
# Add user to plugdev group for USB device access
sudo usermod -a -G plugdev $USERNext Steps:
- Architecture Overview - Understand the system design
- Module Development Guide - Create your first module
- Contributing Guidelines - Contribution workflow