What harm can occur when defining BOOST_DISABLE_ABI_HEADERS when compiling boost?

What harm can occur when defining BOOST_DISABLE_ABI_HEADERS when compiling boost?

From boost file: boost_1_37_0 \ boost \ config \ user.hpp

// BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any // prefix/suffix headers that normally control things like struct // packing and alignment. //#define BOOST_DISABLE_ABI_HEADERS 

Why does increasing increase the need for packaging structuring and alignment?

Perhaps this is due to increased serialization and the guarantee that it will work on all platforms? If I only run windows, can I correctly identify this?

0
source share
3 answers

The following is a description of the definition of BOOST_DISABLE_ABI_HEADERS:

  • If you use several common dll extensions, you will get undefined behavior
  • If you are statically referencing your acceleration libraries or you are sure that you are using only your own DLLs, then you can be safe, read on why I say it can.
  • If you use boost in several .libs in your project, all of them should have the same compiler settings, since a change in the compiler settings can lead to different packaging and alignment.
  • I would suspect that compatibility between different operating systems and platforms (x86 vs x64) might not work for things like serialization.

In general, it is not very safe to determine this and it is much safer to leave him alone.

0
source

Defines the binary interface of the ABI application (

+2
source

Here is what I can find in the Boost docs: http://www.boost.org/doc/libs/1_31_0/libs/config/config.htm

This is for a rather old version, but presumably the value of #define has not changed.

+1
source

All Articles