Answer the question
In order to leave comments, you need to log in
How to achieve ABI stability?
Hello colleagues!
Recently, I have been closely studying the issue of ABI stability. I have developed two main approaches:
Answer the question
In order to leave comments, you need to log in
1 -- there is a mangled import in boost.dll
2 -- if we don't save every byte, then we don't
use template classes only on the client side.
Either C interface or classes with PIMPL stick out from the DLL.
And template helpers wrap on top of them.
Export / import of templates from dll is evil and is not supported by anyone except MSVC
In my opinion, the most stable way is to make a simple C interface for the lib and provide C++ wrappers that the user of your lib will compile himself. After that, all your problems will be solved :)
Another solution is to wait for the 23rd standard, where, according to rumors, the C++ ABI will be standardized. But this is a very optimistic expectation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question