4 ms·
Even if you do link statically you can still run into issues like the std::string one you mentioned earlier. For example WebRTC builds itself with Clang and on
by jgh 9y ago
Even if you do link statically you can still run into issues like the std::string one you mentioned earlier. For example WebRTC builds itself with Clang and on Linux, at least as of last year, and I was having trouble with libc++ on Linux (stupidly I neglected to write down what the issue I was running into was, just that there was an issue) so I wasn't able to use Clang to build my project. As you can imagine that results in some fun because std::string and std::__cxx11::basic_string are two different things.
- gpderetta 9y agoclang, modulo bugs, is fully C++ ABI compatible with GCC (they both follow the intervendor Itanium ABI) on unix systems. Make sure you use the same standard library for all components because libstdc++ and libc++ are different implementations with completely different object layouts. Usually libstdc++ is the system standard library implementation on most Linux flavours (i.e. it is part of the OS ABI), so unless you have specific requirements, go with that (specifically, it should work fine with clang). libstdc++ ABI changed between C++03 and C++11 (that's probably the issue you are having with the string), but even in C++11 mode it is possible to use the old ABI (it is a compile time parameter), if you are willing to put up with the old reference counted strings, O(N) std::list::size and other minor things. If you can it is better to move the the new libstdc++ ABI of course, because the old one might not be maintained forever (it has been unchanged since GCC 3.6, though). Windows is a pain because while the compiler ABI itself hasn't changed in a very long time (although undocumented I believe it has been fully reversed engineered), VC++ doesn't promise a stable library ABI and in fact it has breaking changes every major release.
- Fronzie 9y agoMicrosoft is working towards binary compatiblity: 2015 and 2017 have (some) compatibility: https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017 https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2...