|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2004-12-27 22:11:46
Robert Ramey wrote:
> 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?
Maybe. IIUC whether Comeau supports declspec on Windows depends on
whether it's being used in its "strict ANSI" mode or its "ANSI plus
extensions specific to the platform" mode.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk