-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUILD_SHARED_LIBS=ON on Windows does not produce log outputs #302
Comments
dll.zip |
hey, do you have a previous version that was working ? |
I tried to reproduce and when the shared library is used on windows the log file appears empty. On linux the shared library is working and output is produced. |
It seems that the problem was related to having two same copies of the singleton.. I am compiling with CMAKE arguments :
There is another issue when quill is used as a shared library. When the main program finishes and the dll is existing it seems that the backend worker thread just vanishes without executing the To avoid dropped messages just call |
I have fixed the dropping messages on application exit when dll is used. Please use 5178dd5 or To compile on windows use CMake flags
|
WIN32 The above was my definition in my visual studio. In 2.9.2, I also used "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE -DBUILD_SHARED_LIBS=ON". |
examples are working for me as expected on both debug and release modes I just tried again. Are you building the examples outside of the cmake project ? If yes the examples need to have |
Thanks a lot, it works for me |
hey, glad it is working now. This flag is defined as part of CMake (https://github.com/odygrd/quill/blob/master/quill/CMakeLists.txt#L123) but when building outside of it, it has to be provided |
cmake -DBUILD_SHARED_LIBS=ON -DQUILL_NO_THREAD_NAME_SUPPORT=ON -DCMAKE_INSTALL_PREFIX=./ ..
I use the above command to generate quill.dll & quill.lib to run official demo example_logging_to_file.cpp, no any contents in example_filehandler.log
However, static lib generated by "cmake .. ", whichi is successfully logging to file.
windows 10 & visual studio 2022
quill_include.zip
Attached my quill included files, I added "QUILL_EXPORT" prefix at the front of necessary functions.
The text was updated successfully, but these errors were encountered: