I found the hard way that at least boost::program_options depends on the alignment of the structure member configured by the compiler.
If you increase the forcing using the default settings and associate it with the project using 4-byte alignment ( /Zp4 ), it will work at runtime (did a minimal test using program_options). Boost will generate a statement indicating a possible convention of the wrong call, but the real reason is the alignment of the structure.
Is there any way to prevent this? If alignment makes the code incompatible, should this not be included in library names?
source share