
Hi John, (I don't know if you get this but anyway). If I define & enable a log in a .lib but use it in a .dll somewhere else in the app (via declare in a .hpp file), I don't get no output from the dll: app.exe / \ log.lib stuff.dll (Compiles/links fine and the exe has output - but the dll has not.) Somehow, I want to avoid having a 'DECLARE + setup_logging' in all my dlls. Am I missing something? Best wishes, Dirk Griffioen ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this email in error please notify our system management at postmaster@optiver.com and immediately and permanently delete this message and any attachments. ********************************************

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Dirk Griffioen Sent: Monday, May 09, 2005 8:18 AM To: boost@lists.boost.org Subject: [boost] BOOST_LOG & dlls
Hi John,
(I don't know if you get this but anyway).
If I define & enable a log in a .lib but use it in a .dll somewhere else in the app (via declare in a .hpp file), I don't get no output from the dll:
app.exe / \ log.lib stuff.dll
(Compiles/links fine and the exe has output - but the dll has not.)
Somehow, I want to avoid having a 'DECLARE + setup_logging' in all my dlls.
Am I missing something?
You need to use __declspec(dllexport) & __declspec(dllimport) to share the variable. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html /_core_export_from_a_dll_using___declspec.28.dllexport.29.asp

Hi Dirk, Hope you're using the latest version (logging-v132.zip). It should work, if you define BOOST_LOG_DYN_LINK in both .lib and in the .exe application. If this fails to work, please send me a trimmed down version of your project (john at torjo dot com) Best, John
Hi John,
(I don't know if you get this but anyway).
If I define & enable a log in a .lib but use it in a .dll somewhere else in the app (via declare in a .hpp file), I don't get no output from the dll:
app.exe / \ log.lib stuff.dll
(Compiles/links fine and the exe has output - but the dll has not.)
Somehow, I want to avoid having a 'DECLARE + setup_logging' in all my dlls.
Am I missing something?
Best wishes, Dirk Griffioen
-- John Torjo, Contributing editor, C/C++ Users Journal -- "Win32 GUI Generics" -- generics & GUI do mix, after all -- http://www.torjo.com/win32gui/ -v1.6.3 (Resource Splitter) -- http://www.torjo.com/cb/ - Click, Build, Run!
participants (3)
-
Dirk Griffioen
-
John Torjo
-
Terence Wilson