Skip to main content

8 docs tagged with "linking"

View all tags

Name Mangling in C++

Name mangling (name decoration) encodes C++ function signatures into unique symbol names for the linker. This enables function overloading and namespaces while maintaining linkage compatibility.

Object Files and Symbols

Object files (.o, .obj) are compiled but not yet linked binary files containing machine code, data, and metadata for the linker.

Separate Compilation and Linking

nvcc defaults to compiling each .cu file's device code as a self-contained whole, with every device call resolved and inlined within that one translation unit. That default is invisible right up until device code needs to span files, at which point it fails in a way whole-program C++ intuition doesn't predict.

Static vs Dynamic Linking

Linking can be static (library code copied into executable) or dynamic (library loaded at runtime). Each has trade-offs in size, deployment, and performance.

Translation Units

A translation unit is a single source file plus all its included headers after preprocessing. It's the basic unit of compilation in C++.