
Le 22/01/12 13:41, Mathias Gaunard a écrit :
On 01/22/2012 12:38 AM, Vicente J. Botet Escriba wrote:
Le 22/01/12 00:23, Mathias Gaunard a écrit :
On 01/21/2012 11:29 PM, Vicente J. Botet Escriba wrote:
Ihave found that a little patch to Boost.System could make it header-only. It seems that Beman has already tried it, but there are some errors. Here it is the patch
device3-1:trunk viboes$ svn diff boost/system libs/system Index: boost/system/error_code.hpp =================================================================== --- boost/system/error_code.hpp (revision 76354) +++ boost/system/error_code.hpp (working copy) @@ -504,7 +504,7 @@
#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-# ifdef BOOST_ERROR_CODE_HEADER_ONLY +# ifdef BOOST_SYSTEM_INLINED # include <boost/../libs/system/src/error_code.cpp> # endif
Doesn't that still enable autolink with MSVC?
I don't think so. I could be missing something, could explain why do you think that?
<boost/system/config.hpp> includes <boost/config/auto_link.hpp> regardless or whether BOOST_SYSTEM_INLINED is defined or not.
The code I can see contains #ifdef BOOST_SYSTEM_INLINED #define BOOST_SYSTEM_INLINE inline #define BOOST_SYSTEM_DECL #else #define BOOST_SYSTEM_INLINE ... // // And include the header that does the work: // #include <boost/config/auto_link.hpp> #endif // auto-linking disabled #endif // BOOST_SYSTEM_INLINED The inclusion of boost/config/auto_link.hpp is on the else part, so included only when Boost.System will not be inlined. Vicente