Search⌘ K

Introduction

Explore the foundational concepts of linking within CMake projects, including the role of object files, different library types, and symbol resolution. Understand the One Definition Rule, linking order, and strategies to handle unresolved symbols. Discover how to configure linking correctly for efficient builds and testing preparation.

We'll cover the following...

You might think that after we have successfully compiled the source code into a binary file, our job as build engineers is done. That's almost the case—binary files contain all the code for a CPU to execute, but the code is scattered across multiple files in a very complex way. Linking is a process that simplifies things and makes machine code neat and quick to consume.

Linking support in CMake

A quick glance at the list of commands ...