binary-compatibility

Why binary compatibility?

心不动则不痛 提交于 2019-12-07 11:38:37
问题 I am learning PIMPL idiom. One of its advantage is binary compatibility. I am wondering what the advantages of binary compatibility are. Thanks! 回答1: It avoids the Fragile Binary Interface Problem. It goes like this: Program uses library. User upgrades library. Upgrade changes something in the library's binary interface. Program now doesn't work until it is recompiled because it was built to the old binary interface. One of the advantages of the PIMPL idiom is that it allows you to move

Binary compatibility of STL containers

安稳与你 提交于 2019-12-07 06:45:04
问题 Let's say I write a DLL in C++ and would like to export a method which takes a std::vector parameter. Can I hope for any binary compatibility between different STL versions? 回答1: If you mean between the versions included with updated versions of the same compiler, yes, it can (and will) work in some cases, but you have to be careful. There are also a few special cases, such as the Intel and Microsoft compilers on Windows -- Intel is pretty careful to maintain binary compatibility, and at

binary compatibility vs backward compatibilty

我们两清 提交于 2019-12-06 13:37:41
问题 I've been reading some details about Qt d-pointer and came across the binary compatibility term. Is this the same as backward compatibility? 回答1: Backward compatibility of shared libraries includes: Binary compatibility Source compatibility Behavioral compatibility So, the answer is NO. Binary compatibility is only the part of backward compatibility. See the "Kinds of Compatibility: Source, Binary, and Behavioral" for more info. 来源: https://stackoverflow.com/questions/5728838/binary

STL Containers and Binary Interface Compatibility

末鹿安然 提交于 2019-12-06 10:56:23
问题 STL Binary Interfaces I'm curious to know if anyone is working on compatible interface layers for STL objects across multiple compilers and platforms for C++. The goal would be to support STL types as first-class or intrinsic data types. Is there some inherent design limitation imposed by templating in general that prevents this? This seems like a major limitation of using the STL for binary distribution. Theory - Perhaps the answer is pragmatic Microsoft has put effort into .NET and doesn't

Why are public fields and properties interchangeably binary compatible?

戏子无情 提交于 2019-12-06 02:12:24
问题 In the day job, I work on a VB6 (I know, but don't mock the afflicted...) application that uses a number of libraries we have written (also in the ever illustrious VB6). One of these supporting libraries had a load of private members exposed via public properties, and I was asked to remove the properties, and promote the private member variables into public fields with the same name as the original properties. Now, I'm no COM expert, but I was under the impression that each and every exposed

adding virtual function to the end of the class declaration avoids binary incompatibility?

♀尐吖头ヾ 提交于 2019-12-05 16:13:27
Could someone explain to me why adding a virtual function to the end of a class declaration avoids binary incompatibility? If I have: class A { public: virtual ~A(); virtual void someFuncA() = 0; virtual void someFuncB() = 0; virtual void other1() = 0; private: int someVal; }; And later modify this class declaration to: class A { public: virtual ~A(); virtual void someFuncA() = 0; virtual void someFuncB() = 0; virtual void someFuncC() = 0; virtual void other1() = 0; private: int someVal; }; I get a coredump from another .so compiled against the previous declaration. But if I put someFuncC() at

Binary compatibility of STL containers

徘徊边缘 提交于 2019-12-05 08:31:56
Let's say I write a DLL in C++ and would like to export a method which takes a std::vector parameter. Can I hope for any binary compatibility between different STL versions? If you mean between the versions included with updated versions of the same compiler, yes, it can (and will) work in some cases, but you have to be careful. There are also a few special cases, such as the Intel and Microsoft compilers on Windows -- Intel is pretty careful to maintain binary compatibility, and at least when I've tried it, it's always worked quite nicely. For most other cases, the answer is no. I'm not aware

Refactored methods and binary compatibility in Java

…衆ロ難τιáo~ 提交于 2019-12-05 02:07:46
When refactoring methods it is easy to introduce binary incompabilities (with previous versions of the code) in Java. Consider changing a method to widen the type of its parameter to a parent interface: void doSomething(String x); // change it to void doSomething(CharSequence c); All the code that uses this method will continue to compile without changes, but it does require a re-compile (because the old binaries will fail with a MethodNotFoundError). How about pulling a method up into a parent class. Will this require a re-compile? // before public class B extends A{ protected void x(){}; } /

Questions about “Binary Compatibility between Visual Studio 2015 and Visual Studio 2017”

て烟熏妆下的殇ゞ 提交于 2019-12-04 17:24:52
https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=vs-2017 says that C++ Binary Compatibility between Visual Studio 2015 and Visual Studio 2017 is guaranteed except: 1)When static libraries or object files are compiled with the /GL compiler switch. 2)When consuming libraries built with a toolset whose version is greater than the toolset used to compile and link the application. For example, a program that is compiled and linked with compiler version 19.12 can consume libraries that are compiled with 19.0 up through 19.12. Also, binary compatibility only exists between

STL Containers and Binary Interface Compatibility

二次信任 提交于 2019-12-04 15:49:33
STL Binary Interfaces I'm curious to know if anyone is working on compatible interface layers for STL objects across multiple compilers and platforms for C++. The goal would be to support STL types as first-class or intrinsic data types. Is there some inherent design limitation imposed by templating in general that prevents this? This seems like a major limitation of using the STL for binary distribution. Theory - Perhaps the answer is pragmatic Microsoft has put effort into .NET and doesn't really care about C++ STL support being "first class". Open-source doesn't want to promote binary-only