'Should you expose third party library symbols through a DLL?
I'm wondering about a situation where you are statically linking a third party library to your DLL library. If your DLL includes some functions implemented in headers (like if you have template functions), and these functions call your third party library (think general purpose, like absl::StrAppend()), then you need to either
- export the third party library symbols from your DLL via a .def module or something, or
- ask your client to statically link to the third party library.
Both solutions seem like problems. The first one could create duplicate symbols if your client happens to be linking against the same third party library for their own code. The second means your library isn't self-contained, and might impose versioning requirements on the third-party library that your client could be using at another version. Is there a clean solution here?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
