Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Bazel for C++ Developers
New
5 students

Bazel for C++ Developers

Learn Bazel from Scratch: Build Artifacts, Manage Dependencies, Integrate Tests and Create Macros and Custom Rules
Last updated 10/2026
English

What you'll learn

  • Understand what Bazel is and where it fits in the build pipeline.
  • Build binaries and libraries with Bazel
  • Manage dependencies in different ways with Bazel
  • Integrating tests in Bazel projects
  • Extending Bazel with custom rules and macros

Course content

5 sections • 25 lectures • 2h 30m total length
  • What is Bazel?3:21

    Understanding where compilers, build systems (Bazel, Unix Makefiles) and build systems generators (CMake) come in

  • Why Bazel?2:36

    What are the advantages of Bazel?

  • Installing Bazelisk on Ubuntu7:57
  • Installing Bazelisk on Windows4:27
  • A Simple Hello World Bazel Project (cc_binary example)5:57
  • Hello World with Library (cc_library)4:26
  • Packages, Visiblity and Bazel Query7:00

Requirements

  • Linux or Windows OS (Linux is recommended)
  • Basic C++ knowledge
  • Python knowledge is helpful but not required

Description

This course is for C++ developers and students who want to learn Bazel, a powerful build system used in real-world software projects.

As software projects grow, managing dependencies, compiling code, and running tests can become increasingly complicated. A good build system helps you automate these tasks, improve build efficiency, and keep your projects organized.

Have you ever encountered Bazel at work and struggled to understand how it works? Or found yourself confused by BUILD files, dependencies, and unfamiliar commands?

Whether you're completely new to Bazel or have already used it without fully understanding what's happening behind the scenes, this course will help you understand Bazel and use it with confidence.

No previous experience with Bazel is required. Basic C++ knowledge and familiarity with the command line are recommended. Python knowledge can be helpful, but it is not required.

If you're completely new to Bazel, this course will guide you through the fundamentals. If you already have some experience, please explore the curriculum to see if there is anything new and of value for you.

Bazel is cross-platform. In this course, we'll work with:

  • Windows

  • Linux

The course includes explanations and hands-on coding examples. I strongly recommend that you try the examples yourself, experiment with them, and modify them to better understand how Bazel works.

Here's a brief overview of what you'll learn:

  • Getting started with Bazel

    • Installing Bazel on Windows and Linux

    • Creating and building your first C++ project

    • Understanding workspaces, modules, and BUILD files

  • Building C++ projects

    • Creating executables and libraries

    • Working with packages and dependencies

    • Static and shared libraries

    • Understanding build outputs and visibility

  • Managing external dependencies

    • Using the Bazel Central Registry (BCR)

    • Integrating external libraries

    • Working with http_archive and cc_import

    • Using OpenCV in a Bazel project

  • Automated testing

    • Creating tests with cc_test

    • Integrating Google Test

    • Organizing tests with test_suite

  • Macros and custom build rules

    • Understanding Starlark

    • Writing reusable macros

    • Generic rules with genrule

    • Creating custom build rules

    • Understanding Bazel's loading, analysis, and execution phases

    • Testing custom rules with analysis tests (Skylib)

By the end of this course, you'll have a solid understanding of how Bazel works and how to use it to build, test, and manage your own C++ projects.

Let's get started!

Who this course is for:

  • C++ developers and students who want to learn an in-demand and valuable industry skill.
  • Developers who want to learn a better build system, including dependency management and testing