last highlighted date: 2024-02-26
Highlights
- CMake will usually handle circular dependencies automatically by repeating the component library names twice on the linker command line. However this strategy doesn’t always work, and the build may fail with a linker error about “Undefined reference to …”, referencing a symbol defined by one of the components inside the circular dependency. This is particularly likely if there is a large circular dependency, i.e., A > B > C > D > A.