Binary compatibility is generally an ability of two hardware/software systems to run the same binary code without the need to recompile.
Questions tagged [binary-compatibility]
184 questions
3
votes
3 answers
Java binary compatibility - RFC on proposed solution to covariant return type using invokevirtual semantics
I'm trying to evolve an API. As part of this evolution I need to change the return type of a method to a subclass (specialize) in order for advanced clients to be able to access the new functionality.
Example (ignore the ugly :
public interface…

Ran Biron
- 6,317
- 5
- 37
- 67
3
votes
1 answer
Reference counted structure exposing a POD interface
I currently have a structure that declares a copy constructor, and a destructor, and keeps a reference count to a pimpl object. This allows me to pass this structure around by value. I need to refactor it because I want it to have a POD interface…

Alex Darsonik
- 597
- 5
- 18
3
votes
5 answers
Is it possible to share a C struct in shared memory between apps compiled with different compilers?
I realize that in general the C and C++ standards gives compiler writers a lot of latitude. But in particular it guarantees that POD types like C struct members have to be laid out in memory the same order that they're listed in the structs…

Joseph Garvin
- 20,727
- 18
- 94
- 165
3
votes
4 answers
Can Global Arrays in C++ Break Binary Compatibility?
Say a shared library contains the following lines:
const char* const arr[] =
{
"one",
"two",
"three"
};
1) Can an application link to this library and use the symbol "arr"?
2) Is binary compatibility broken if a new element is added to the…

Luke
- 65
- 3
3
votes
5 answers
How do I compile to x64 binary from a x86 platform running VS2008 Pro?
I am trying to compile my apps (which uses 3rd party libraries) for the x64 platform. However selecting x64 from Build Configuration Manager from my VS2008 Pro doesn't seem to work. The binary does get created but my client wasn't able to get it to…
onescaredycat
3
votes
2 answers
Does changing the return type of a function for a child type breaks binary compatibility?
Let's go straight to it :
Old code :
public interface IFoo {}
public class Foo : IFoo {}
...
public static IFoo Bar() { return new Foo(); }
New code :
public static Foo Bar() { return new Foo(); }
Obviously there should be no problem here,…

Zonko
- 3,365
- 3
- 20
- 29
3
votes
2 answers
Datastructure Storage in Filesystem
I am trying to write a persistent datastructure in C++ , however I feel that I should be able to make it binary compatible with various other implementations of my datastructure readers, and hence, my current idea is to declare datastructure in the…
user796530
3
votes
3 answers
Does source incompatibility always imply binary incompatibility?
Any examples demonstrating where source compatibility is broken yet binary compatibility is maintained is welcome.
Anon
3
votes
4 answers
Does removing the "final" keyword affect binary compatibility?
If I remove the final keyword from a method or other "thing", will users of my class have to recompile?

Nova
- 2,623
- 4
- 26
- 45
3
votes
3 answers
Changing a constructor param type breaks class in another jar
I have the following class in a common jar:
public class Common
{
public Common(List list)
{
...
}
}
I then change the constructor parameter from a List to a Collection as follows:
public class Common
{
public Common(Collection…

Nick Holt
- 33,455
- 4
- 52
- 58
2
votes
3 answers
STL Containers and Binary Interface Compatibility
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…

Will Bickford
- 5,381
- 2
- 30
- 45
2
votes
3 answers
Virtual override and binary compatibility
I have a library that can be compiled as a shared library (or DLL in Windows). It has a class that is derived from another class in another library. The base class has some virtual methods and my class overrides a few of them. For example:
class…

Sergei Tachenov
- 24,345
- 8
- 57
- 73
2
votes
1 answer
What does the term "Changing type from unsigned type to signed counterpart (and vice versa) is a binary incompatible change" in Kotlin documentation?
I'm a true beginner to Kotlin and I was wondering what the following term means in Kotlin documentation.
Changing type from unsigned type to signed counterpart (and vice
versa) is a binary incompatible change.
In fact I've read about binary…

Sepideh Abadpour
- 2,550
- 10
- 52
- 88
2
votes
1 answer
Can changing from private constructor/assignment operator to deleted break binary compatibility?
Using C++11.
I have a class I want to clean-up a bit by making the following changes:
From
class MyClass {
public:
// code
private:
MyClass(const MyClass&);
MyClass& operator=(const MyClass&);
// members
};
To
class MyClass {
public:
//…

A. Gille
- 912
- 6
- 23
2
votes
1 answer
Is the official binary incompatibility between VS2017 and VS2015 app vs. dll accurate?
TL;DR - The MS docs state that binary compatibility between VS2015 and VS2017 libs is one-way, while I'd assumed it is necessarily two-way. Where's the catch?
First, for background:
Any MSVC++ built libraries are officially binary compatible…

Martin Ba
- 37,187
- 33
- 183
- 337