Open aschet opened 2 months ago
I'm not sure if this fixes your specific issue, but after fixing the MSVC/vcpkg build configuration in https://github.com/D7EAD/liboai/pull/84 I tried
cmake .. -DBUILD_SHARED_LIBS:BOOL=ON
and was able to build DLLs. There may be some extra exports there, but its usable.
Describe the feature or improvement you're requesting
It would be great if you could add proper support for the compilation of the library as DLL on Windows via the BUILD_SHARED_LIBS CMake variable. Currently the declspec(dllexport) attribute is applied to many methods in the codebase. If there is no intention to support DLL compilation, please remove the declspec(dllexport) attribute since it is not required for static libraries. I would even consider this an error as it is applied now. To support DLL compilation, something like this has to be implemented:
liboai\include\core\response.h:
liboai\CMakeLists.txt:
Furthermore, the
LIBOAI_EXPORT
macro has to be applied to all methods that are used by a client.Additional context
No response