Boost logo

Boost :

From: Schaible, Joerg (joerg.schaible_at_[hidden])
Date: 2001-01-11 04:17:19


Just see http://www.egroups.com/message/boost/1953

Some things pop up again and again <g>

-----Original Message-----
From: Beman Dawes [mailto:beman_at_[hidden]]
Sent: Wednesday, January 10, 2001 11:34 PM
To: Boost.org mailing list
Subject: [boost] Stupid Win32 DLL vs Static question

I'm working on prototype build scripts. In testing, I ran into static
linking problems. In boost/config.hpp we now define this:

# if defined BOOST_DECL_EXPORTS
# define BOOST_DECL __declspec(dllexport)
# else
# define BOOST_DECL __declspec(dllimport)
# endif

For static linking to also work, doesn't that have to be:

# if defined BOOST_DECL_EXPORTS
# define BOOST_DECL __declspec(dllexport)
# elif defined BOOST_DECL_IMPORTS
# define BOOST_DECL __declspec(dllimport)
# else
# define BOOST_DECL
# endif

And for better error detection, add something like:

# if defined BOOST_DECL_EXPORTS && defined BOOST_DECL_IMPORTS
# error both BOOST_DECL_EXPORTS && BOOST_DECL_IMPORTS defined
# endif

mystified-again-by-VC++,

--Beman


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