fmtlog
fmtlog copied to clipboard
Building on Win32 / Visual Studio generates a .dll with no exports
Hi! I succesfuly built fmtlog with CMake on a Windows 10 box, with CMake 3.25.0 and Visual Studio 2019. Targets fmtlog-static.lib and fmtlog-shared.dll are generated. Tests targets enc_dec_test.exe, log_test.exe, multithread_test.exe are generated linking against the static library.
But:
fmtlog-shared.dll has no exported symbols, because they are actually not exported i.e. no FMTLOG_API that resolves to __declspec(dllimport) / __declspec(dllexport), with some FMTLOG_EXPORTS compile symbol defined when building the DLL. (So there is no fmtlog-shared.lib because no symbol is exported)
I know... Stupid Windows linker, GNU ld does not need this...