SystemC is distributed as source code — there is no apt package, no brew formula, no installer. You download the source from Accellera, build it with CMake, and link your own simulations against the resulting library. This guide walks through the complete process on all three major platforms.

No installation? Use EDA Playground If you just want to run SystemC code without installing anything, EDA Playground offers a free browser-based SystemC environment. Come back here when you need a local setup for serious development.

Prerequisites

PlatformRequiredOptional
Linuxg++ ≥ 7, cmake ≥ 3.14, makeninja, gdb
macOSXcode Command Line Tools, cmake ≥ 3.14Homebrew, lldb
WindowsVisual Studio 2019/2022 (C++), cmake ≥ 3.14Git Bash, Ninja

Download SystemC

The official source is Accellera. SystemC 2.3.3 is the latest stable release (IEEE 1666-2023 compliant).

  1. Go to accellera.org/downloads/standards/systemc
  2. Download systemc-2.3.3.tar.gz (free, requires creating an Accellera account)
  3. Or clone the open-source mirror: git clone https://github.com/accellera-official/systemc.git
Version note Some Linux package managers offer libsystemc-dev but it's usually outdated (2.3.1 or older). Always build from Accellera source to get the latest IEEE standard compliance.

Linux Installation

Step 1 — Install dependencies

# Ubuntu / Debian
sudo apt-get update
sudo apt-get install -y g++ cmake make

# Fedora / RHEL / CentOS
sudo dnf install -y gcc-c++ cmake make

Step 2 — Extract and build

tar -xzf systemc-2.3.3.tar.gz
cd systemc-2.3.3
mkdir build && cd build

cmake .. \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_PREFIX=/usr/local/systemc-2.3.3

make -j$(nproc)
sudo make install

This installs SystemC under /usr/local/systemc-2.3.3/ with headers in include/ and the library in lib/.

Step 3 — Set environment variables

Add to your ~/.bashrc or ~/.zshrc:

export SYSTEMC_HOME=/usr/local/systemc-2.3.3
export LD_LIBRARY_PATH=$SYSTEMC_HOME/lib:$LD_LIBRARY_PATH
source ~/.bashrc

Step 4 — Compile your first simulation

g++ -std=c++14 \
  -I$SYSTEMC_HOME/include \
  -L$SYSTEMC_HOME/lib \
  -lsystemc \
  -DSC_CPLUSPLUS=201402L \
  hello.cpp -o hello

./hello

macOS Installation

Step 1 — Install dependencies

# Install Xcode Command Line Tools (if not already installed)
xcode-select --install

# Install CMake via Homebrew
brew install cmake

Step 2 — Extract and build

tar -xzf systemc-2.3.3.tar.gz
cd systemc-2.3.3
mkdir build && cd build

cmake .. \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_INSTALL_PREFIX=$HOME/systemc-2.3.3 \
  -DCMAKE_CXX_STANDARD=14

make -j$(sysctl -n hw.logicalcpu)
make install
Apple Silicon (M1/M2/M3) — library directory is lib-macosxarm On ARM64 Macs the build system names the library directory lib-macosxarm (not lib). Use this exact name in your -L flag and DYLD_LIBRARY_PATH. Check with arch that you're not running under Rosetta.

Step 3 — Set environment variables

Add to your ~/.zshrc:

export SYSTEMC_HOME=$HOME/systemc-2.3.3
# ARM64 Mac — library dir is lib-macosxarm
export DYLD_LIBRARY_PATH=$SYSTEMC_HOME/lib-macosxarm:$DYLD_LIBRARY_PATH
source ~/.zshrc

Step 4 — Compile your first simulation

g++ -std=c++14 \
  -I$SYSTEMC_HOME/include \
  -L$SYSTEMC_HOME/lib-macosxarm \
  -lsystemc \
  -DSC_CPLUSPLUS=201402L \
  hello.cpp -o hello

./hello

Windows Installation

Step 1 — Install prerequisites

  1. Download and install Visual Studio 2022 — select the Desktop development with C++ workload
  2. Download and install CMake — tick "Add CMake to the system PATH" during install

Step 2 — Extract and build (Developer Command Prompt)

Open Developer Command Prompt for VS 2022 (not regular CMD):

:: Extract the archive first, then:
cd systemc-2.3.3
mkdir build && cd build

cmake .. -G "Visual Studio 17 2022" -A x64 ^
  -DCMAKE_INSTALL_PREFIX=C:\systemc-2.3.3 ^
  -DCMAKE_BUILD_TYPE=Release

cmake --build . --config Release
cmake --install . --config Release

Step 3 — Set environment variables

Open System Properties → Environment Variables and add:

VariableValue
SYSTEMC_HOMEC:\systemc-2.3.3
PATH (append)C:\systemc-2.3.3\lib

Step 4 — Compile (Developer Command Prompt)

cl /std:c++17 /EHsc ^
  /I"%SYSTEMC_HOME%\include" ^
  hello.cpp ^
  /link /LIBPATH:"%SYSTEMC_HOME%\lib" systemc.lib

hello.exe
Using CMake for your project (recommended) Rather than manual compiler flags, use CMake for your own project with a CMakeLists.txt — shown in the next section. This works identically on all three platforms.

Hello World — Verify the Installation

Create hello.cpp:

#include <systemc.h>

SC_MODULE(Hello) {
  void say_hello() {
    cout << "Hello from SystemC @ " << sc_time_stamp() << endl;
  }

  SC_CTOR(Hello) {
    SC_THREAD(say_hello);
  }
};

int sc_main(int argc, char* argv[]) {
  Hello h("h");
  sc_start();
  return 0;
}

Expected output:

        SystemC 2.3.3-Accellera --- Apr  9 2026 10:00:00
        Copyright (c) 1996-2022 by all Contributors,
        ALL RIGHTS RESERVED

Hello from SystemC @ 0 s

CMake Project Template (All Platforms)

Once SystemC is installed, the cleanest way to build your own projects is with CMake. Create a CMakeLists.txt in your project root:

cmake_minimum_required(VERSION 3.14)
project(my_systemc_sim CXX)

set(CMAKE_CXX_STANDARD 17)

# Point to your SystemC install
set(SYSTEMC_HOME "$ENV{SYSTEMC_HOME}")

include_directories("${SYSTEMC_HOME}/include")
link_directories("${SYSTEMC_HOME}/lib")

add_executable(sim main.cpp)
target_link_libraries(sim systemc)

Build on any platform:

mkdir build && cd build
cmake ..
cmake --build .

Common Errors and Fixes

ErrorCauseFix
systemc.h: No such file Include path not set Add -I$SYSTEMC_HOME/include to compiler flags
cannot find -lsystemc Library path not set Add -L$SYSTEMC_HOME/lib and check LD_LIBRARY_PATH
dyld: Library not loaded (macOS) DYLD_LIBRARY_PATH not set Run export DYLD_LIBRARY_PATH=$SYSTEMC_HOME/lib
LNK1104: cannot open 'systemc.lib' (Windows) Library path missing in linker Add /LIBPATH:"%SYSTEMC_HOME%\lib" to linker flags
Undefined sc_main Entry point missing Rename main() to sc_main() — SystemC requires this
Architecture mismatch (M1 Mac) Rosetta vs native ARM64 Rebuild SystemC natively: arch -arm64 cmake ..

Quick Reference

PlatformLibrary fileRuntime env var
Linuxlibsystemc.a / .soLD_LIBRARY_PATH
macOSlibsystemc.a / .dylibDYLD_LIBRARY_PATH
Windowssystemc.lib / .dllPATH

Summary


📬 Get new articles in your inbox

Deep dives on SystemC, C++, and embedded systems — no spam, unsubscribe any time.

Aditya Gaurav

Aditya Gaurav

Embedded systems engineer specializing in SystemC, ARM architecture, and C/C++ internals. Writing deep technical dives for VLSI and embedded engineers.