# Windows DLL with ALL symbols of dependent static libs

**URL:** https://discourse.cmake.org/t/windows-dll-with-all-symbols-of-dependent-static-libs/8185
**Category:** Code
**Tags:** os:windows
**Created:** [May 23, 2023, 6:25am UTC](https://discourse.cmake.org/t/windows-dll-with-all-symbols-of-dependent-static-libs/8185 "2023-05-23T06:25:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![robiwano](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robiwano/32/1027_2.png) [@robiwano](https://discourse.cmake.org/u/robiwano)
#### Post date: [May 23, 2023, 6:25am UTC](https://discourse.cmake.org/t/windows-dll-with-all-symbols-of-dependent-static-libs/8185/1 "2023-05-23T06:25:53Z")

</div>

I want to assemble a Windows DLL which depends on a plethora of internal and third-party static libraries to export ALL symbols of ALL libraries, but it seems nigh to impossible. I’ve tried target\_link\_libraries with WHOLE\_ARCHIVE, CMAKE\_WINDOWS\_EXPORT\_ALL\_SYMBOLS. Closest I’ve gotten is to add the target objects of each dependency.

I’m all out of ideas.

---

<div class="post-metadata">

### Author: ![robiwano](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robiwano/32/1027_2.png) [@robiwano](https://discourse.cmake.org/u/robiwano)
#### Post date: [May 24, 2023, 8:31am UTC](https://discourse.cmake.org/t/windows-dll-with-all-symbols-of-dependent-static-libs/8185/3 "2023-05-24T08:31:01Z")

</div>

If I use the $\<LINK\_LIBRARY:WHOLE\_ARCHIVE,lib\> option, I can see that the library is included in the linker options (also using /INCREMENTAL:NO), but still, no symbol is generated in the exports.def file.

---

<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: [May 29, 2023, 12:46pm UTC](https://discourse.cmake.org/t/windows-dll-with-all-symbols-of-dependent-static-libs/8185/4 "2023-05-29T12:46:00Z")

</div>

I think that [this issue](https://gitlab.kitware.com/cmake/cmake/-/issues/22679) is most closely related to this.

---

<div class="post-metadata">

### Author: ![robiwano](https://discourse.cmake.org/user_avatar/discourse.cmake.org/robiwano/32/1027_2.png) [@robiwano](https://discourse.cmake.org/u/robiwano)
#### Post date: [May 29, 2023, 1:01pm UTC](https://discourse.cmake.org/t/windows-dll-with-all-symbols-of-dependent-static-libs/8185/5 "2023-05-29T13:01:43Z")

</div>

Yes, indeed. Thanks!
