|
Boost Users : |
Subject: Re: [Boost-users] Structure size when compiling with and without -std=c++11
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2015-08-02 20:11:22
On 1/08/2015 07:25, Miloslav Marik wrote:
> It means that c++11 program cannot be linked with boost libraries
> compiled without "-std=c++11" option. It was asio in my case and the
> program was linked with libboost_log.so.1.58.0.
In general it is a Really Bad Idea to link object files created with
different ABI standards (including C++ standard, but there are also
other settings that affect this), or that use a different libc/STL.
Sometimes you can get away with linking files created by different
compilers (in particular I think GCC and Clang are designed to be
interoperable, provided you're using the same C++ ABI and libc
settings), but in general you should try to avoid that too.
If you're using DLLs/SOs and the API is designed *really* carefully,
then you may at times be able to interoperate with different
compilers/libc, but this is quite tricky unless you stick with a pure C
API (since the C ABI is simpler and more stable).
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net