I’m trying to use a library named Alglib which has no CMake support. Such support is provided here: GitHub - S-Dafarra/alglib-cmake: CMake files to download and build ALGLIB, to be used as an external library..
I can build it as a shared library on windows with msvc, but, when I try to link it with an executable, I’ve got undefined symbols. If I build as a static library, it works fine.
Alglib code does not contain export code for windows dll but the CMakeLists linked above uses set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON).
According to the documentation, explicitly marking some entities with __declspec(dllimport) would remain mandatory?
For instance, in Alglib I see:
namespace alglib {
...
extern const xparams &xdefault;
...
}
Is it correct that for this symbol to be visible, WINDOWS_EXPORT_ALL_SYMBOLS is not enough and __declspec(dllimport) should be added to Alglib sources?