# Multiple shared libs, alternative implementations of common interface, \*minimal\* cmake/c++ example?

**URL:** https://discourse.cmake.org/t/multiple-shared-libs-alternative-implementations-of-common-interface-minimal-cmake-c-example/15161
**Category:** Code
**Created:** [September 10, 2025, 7:35am UTC](https://discourse.cmake.org/t/multiple-shared-libs-alternative-implementations-of-common-interface-minimal-cmake-c-example/15161 "2025-09-10T07:35:56Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [February 20, 2026, 3:10am UTC](https://discourse.cmake.org/t/multiple-shared-libs-alternative-implementations-of-common-interface-minimal-cmake-c-example/15161/6 "2026-02-20T03:10:11Z")

</div>

This question and its discussion may be of use:

> [@Interfaces, implementations, and unresolved symbols](https://discourse.cmake.org/t/interfaces-implementations-and-unresolved-symbols/5283):
>
> Hi, how should we model the following situation in CMake? There is an interface specification (e.g. set of C language header files): H There are two (static) libraries L1 and L2, each of them implementing this interface H There is a (static) library U which uses the H interface but does not care whether L1 or L2 is used to implement that interface There is another (static) library M which uses U Finally, there are two executables E1 and E2 which both use M and additionally L1 or L2, respec…

---

_[View the full topic](https://discourse.cmake.org/t/multiple-shared-libs-alternative-implementations-of-common-interface-minimal-cmake-c-example/15161)._
