abi - Are there tools to check whether changes to a C++ class will break a previous version of that class? -


if you've been programming in c++ while, ran program crashed "for no obvious reason" find out abi of library not compatible anymore , had recompile software against new version of library.

the reason abi breaks multiple: change in virtual table, adding/removing constructors, destructor, or variable members...

what i'm wondering this: there tool can used compare 2 class definitions (old version , current version) , tell me whether abi compatible or not.

this useful determine version of project (i.e. if abi changed, go 1.2.7 1.3.0, if abi did not change, go 1.2.8).

many people program in c++ have had problem. example qt states patches not break binary compatibility (although once in while make mistake, generally, code quite solid).

http://qt-project.org/wiki/qt-version-compatibility
http://qt-project.org/faq/answer/is_qt_binary_compatible

however, qt has staff can spend time in verifying (all manually?) public classes have not changed in way break compatibility. couldn't of many smaller c++ projects.

on linux there abi-compliance-checker tool. can used verify backward binary compatibility of c++ library. see sample reports of tool qt library: http://abi-laboratory.pro/tracker/timeline/qt/

you need compile debug version of library addition -g -og options , dump abi of library of abi-dumper tool. , compare 2 abi dumps of different versions generate abi changes report.

enter image description here


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -