
-----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