Is your feature request related to a problem? Please describe.
It would be great if the project could provide shared libraries (.dll) and expose symbols via .lib files when build on Visual Studio.
Describe the solution you'd like
The CMake offers the feature WINDOWS_EXPORT_ALL_SYMBOLS, which exposes all symbols to a .lib file, but it's considered a bad practice.
On the other hand, it's possible to use GenerateExportHeader to manage __declspec and only add the keyword to those methods that should be exported. Much safer.
As third alternative, would be possible adding a .def file to CMake, listing only those symbols that should be exported. It's harder to maintain, because devs should not forget to update both sources and .def file.
Describe alternatives you've considered
Not support shared libraries on Windows and making it explicit in the project.
Additional context
So far, the CI only builds static libraries, so we didn't detect this limitation before.
Is your feature request related to a problem? Please describe.
It would be great if the project could provide shared libraries (.dll) and expose symbols via .lib files when build on Visual Studio.
Describe the solution you'd like
The CMake offers the feature WINDOWS_EXPORT_ALL_SYMBOLS, which exposes all symbols to a .lib file, but it's considered a bad practice.
On the other hand, it's possible to use GenerateExportHeader to manage
__declspec
and only add the keyword to those methods that should be exported. Much safer.As third alternative, would be possible adding a
.def
file to CMake, listing only those symbols that should be exported. It's harder to maintain, because devs should not forget to update both sources and .def file.Describe alternatives you've considered
Not support shared libraries on Windows and making it explicit in the project.
Additional context
So far, the CI only builds static libraries, so we didn't detect this limitation before.