Repository navigation
-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=true for MSBuild #934
Replies: 3 comments
|
okay, fun fact is that when I tried to build the DLL wrapper with the 12.0.0 version I was able to compile the DLL wrapper but the executable which was the consumer of the DLL was complaining (i.e. the linker was complaining) like this: It looks like some functions from fmtquill namespace could not be found by the linker... I was looking at some MACROS here for importing/exporting function through the DLL but nothing has been mentioned in the official docs for that and in the source code there were couple of "promising" flags starting with FMTQUILL_* but instead of playing around with them I tried to build my DLL wrapper with the help of the CMake and then linked it against my exe and I was able only then finally to compile/link exe as well... |
|
Hey, Thanks for the detailed report!
Quill is header-only, and the shared-library example is a wrapper DLL around the header-only code. For MSBuild, the important bits are:
With regards to the link errors are a separate issue. As a workaround before the fix is released, include: #include "quill/bundled/fmt/format.h"
before using `quill/DirectFormatCodec.h` |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
In our company we use MSBuild instead of CMake thus there is no easy way to set up the DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE flag, but even without setting up this flag my DLL wrapper around Quill library seems to be working fine. I'm using the version 11.1.0. Has this been improved in a meantime, making the -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE CMake flag unnecessary? Maybe we are using just the trivial logging features which are working even without the flag... according to this issue this seems to be mandatory when using the Quill as a shared library? Are there any issues when this flag is not set up when building library as a DLL wrapper? Also, are there any inputs on how to set up this flag for MSBuild maybe?
All reactions