C++ Shared Libraries and Where To Find Them
Talkat CppCon 2024 · on Tuesday, 2024-09-17· at 14:00· Spruce 3/4, 6700 North Gaylord Rockies Boulevard·
summary
Covers exactly when libraries get found — at configure, link, run and package time — and which tools reveal the truth: ld/ld.so and ldd, readelf/objdump, otool/install_name_tool, Dependency Walker on Windows. Demonstrates surprising behaviors: linkers on Linux happily emit a .so with undefined symbols (indirect deps must be recorded or RPATHs adjusted). Shows practical fixes: RPATH vs RUNPATH tradeoffs, LD_LIBRARY_PATH tricks, copying DLLs for Windows, and packaging approaches including Conan + CMake build/install trees and AppImage; notes cross‑build and edge cases where these only partially work.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 0:54Shared libraries importance
- 3:02When shared libraries needed
- 4:04Linking shared libraries
- 6:35Runtime linker search paths
- 9:46Inspecting ELF dependencies
- 13:40Local project libraries in builds
- 16:50Indirect dependencies behavior
- 22:54Shared libraries on Apple
- 29:57Windows DLLs and imports
- 35:52Why libraries located before compile
- 43:22Build systems and descriptors
- 43:43CMake runtime trees
- 47:35Windows debugging executables
- 50:51Creating relocatable bundles
- 58:17Q&A
related talks
55mDynamically Loaded Libraries Outside the Standard
01h 00mLinkers, Loaders and Shared Libraries in Windows, Linux, and C++
01h 02mDeep CMake for Library Authors
06mRpath and binary reuse
01h 01mClean CMake for C++ (library) developers
05mClang on Windows: It's a Thing
01h 29mLibraries: A First Step Toward Standard C++ Dependency Management
16mMind the Gap (Between Your Code and Your Toolchain)
