Questions tagged [binary-compatibility]

Binary compatibility is generally an ability of two hardware/software systems to run the same binary code without the need to recompile.

184 questions
5
votes
3 answers

Binary Compatible about changing return type C++

I have a question about binary compatibility. I have class A, which includes a public method foo(), and an attribute string _foo; const string foo() {return _foo;} When I changed to const string& foo(){return _foo;} Is it still binary compatible?…
CJAN.LEE
  • 1,108
  • 1
  • 11
  • 20
5
votes
6 answers

Binary compatibility between Linux distributions

Sorry if this is an obvious question, but I've found surprisingly few references on the web ... I'm working with an API written in C by one of our business partners and supplied to us as a .so binary file, built on Fedora 11. We've been testing…
gareth_bowles
  • 20,760
  • 5
  • 52
  • 82
5
votes
2 answers

Using getter/setter other than public field for binary compatibility?

I am reading "Practical API design" and find following paragraph: "The other reason to prefer methods over fields can be found in the JVM specification. You’re permitted to move a method from a class to one of its superclasses and still maintain…
zx_wing
  • 1,918
  • 3
  • 26
  • 39
4
votes
2 answers

Binary cross-compiler compatibility of C libraries on Windows

My question is similar to this one, but also regards static libraries: We have a cross-platform C++ header library that builds nicely under Windows/Linux/Os X that works on multiple compilers and both 32 and 64 bit. When the user has zlib or libbz2…
Manuel
  • 6,461
  • 7
  • 40
  • 54
4
votes
1 answer

will adding a new bit-field to my C-struct break binary-compatibility?

I have inherited some code that makes use of bitfields in a struct: typedef _my_flags { unsigned int x_ida:1; unsigned int x_foo:6; unsigned int x_bar:6; unsigned int x_bonzo:6; unsigned int x_pizza:6; unsigned int x_jack:1; …
umläute
  • 28,885
  • 9
  • 68
  • 122
4
votes
1 answer

Is changing the pointer type of a private member variable in an interface class binary compatible?

class Type1; class Type2; class __declspec(dllexport) Foo { public: Foo(); private: Type1 * m_p1; Type2 * m_p2; }; Can I replace Type1 with Type3 without breaking binary compatibility? Background: Unfortunately, this class does not use…
Fabian
  • 4,001
  • 4
  • 28
  • 59
4
votes
2 answers

ABI compatibility preservation with C++11 `enum class`

This is pretty much the same question as Does adding enumerators into enum break ABI?, but with enum class introduced by C++11. For what I understand by this page I can simply have a stable ABI by defining an underlying type for my enumerative: enum…
Dacav
  • 13,590
  • 11
  • 60
  • 87
4
votes
1 answer

VB6 IDE Is Locking The Loaded Project's DLL

I'm responsible for maintaining legacy VB6 code, and have encountered an annoying problem with regard to the locking of a project's COM DLL. (We'll call it MyProject and MyProject.dll) When I load MyProject into the VB6 IDE, I am able to compile the…
James Wiseman
  • 29,946
  • 17
  • 95
  • 158
4
votes
1 answer

Is it possible to achieve binary compatibility in .NET library?

I have a .NET library visible in COM, and it's called from a vb6 application. If I add some methods and release a new version (but don't erase or change signatures of existing methods), I would like being able to just install it in the production…
raven
  • 2,574
  • 2
  • 27
  • 49
4
votes
1 answer

No binary compatibility although a declaration is kept identical

I'm stuck on trying generating a new version of a COM DLL with binary compatibility. I don't understand why I get this message : 'init' in the 'Logger' class module has arguments and/or a return type that is incompatible with a similar declaration…
Amessihel
  • 5,891
  • 3
  • 16
  • 40
4
votes
4 answers

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

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; …
bob
  • 1,941
  • 6
  • 26
  • 36
4
votes
3 answers

C++ exceptions binary compatibility

my project uses 2 different C++ compilers, g++ and nvcc (cuda compiler). I have noticed exception thrown from nvcc object files are not caught in g++ object files. are C++ exceptions supposed to be binary compatible in the same machine? what can…
Anycorn
  • 50,217
  • 42
  • 167
  • 261
4
votes
3 answers

How do I tell vb6 not to create new versions of interfaces/com objects everytime I make dll?

I have vb6 com server (ActiveX DLL project) that is used by .NET code Everytime I put changes into vb6 code and make dll, I have to recompile my .NET client code as well, because it looks like VB6 generates new GUIDs or versions to interfaces and…
user149691
  • 587
  • 1
  • 5
  • 19
4
votes
2 answers

About the binary compatibility of Linux

If I get some C++ code built by, lets say, GCC 4.8 on Ubuntu, the code has no GUI/interface, only call standard Linux libraries, then can the binary run on RHEL 5/6, with much older GCC flawlessly?
user2188453
  • 1,105
  • 1
  • 12
  • 26
4
votes
2 answers

Using a 64-bit uint for pointer values in 32-bit mode?

I am implementing a C-based programming language and I would like to implement a compilation mode that is agnostic to whether it runs in 32-bit or 64-bit mode. All my data types have explicit width, so binary compatibility there is not a problem,…
user2341104