Duplicated Namespaces and Dynamically Linked Symbols
Let's learn about dynamically linked duplicated symbols and exporting names from libraries.
We'll cover the following
Dynamically linked duplicated symbols
The ODR rule works exactly the same for static libraries as it does for object files, but things aren't so clear when we build our code with SHARED
libraries. A linker will allow duplicated symbols here. In the following example, we'll create two shared libraries, A
and B
, with one duplicated()
function and two unique a()
and b()
functions:
Get hands-on with 1400+ tech skills courses.