Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2004-12-28 05:44:54


> I've investigated what it takes to compile auto-link with commeau.
>
> It seems that the following in config/platform/win32.hpp contains:
>
> #if !defined(__GNUC__) && !defined(BOOST_HAS_DECLSPEC) \
> # define BOOST_HAS_DECLSPEC
> #endif
>
> which results in BOOST_HAS_DECSPEC being defined. However, I get a
> compile
> error when BOOST_???_DECL is expanded to _decl(dllimport) or
> _decl(dllexport) . So my proposed solution is: to replace the above with:
>
> // Comeau seems to recognize declspec but doesn't recognize
> // dllexport and dllimport. So we can't use it
> #if !defined(__GNUC__) && !defined(BOOST_HAS_DECLSPEC) \
> && !defined(__COMO__)
> # define BOOST_HAS_DECLSPEC
> #endif
>
> This will suppress auto-link stuff for this compiler.
>
> I would like to check in this change. Does anyone know of a reason why
> this
> is not a good idea?

Looks good to me, but this is a dll-build issue, not an auto-linking one ;-)

In fact the question then becomes if commeau doesn't support
__declspec(dllexport) then how does one build dll's with that compiler? Is
it possible at all, or does it require special command line options (maybe
we really just need to fix the commeau bjam toolset)?

Thanks for looking into this,

John.


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