Boost logo

Boost :

From: Terence Wilson (tez_at_[hidden])
Date: 2005-05-09 12:06:45


> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Dirk Griffioen
> Sent: Monday, May 09, 2005 8:18 AM
> To: boost_at_[hidden]
> 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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk