Results 1 to 3 of 3

Thread: How to find out the earliest compatible version of a library?

  1. #1
    Join Date
    Jan 2006
    Location
    11 N 78 E
    Posts
    110
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question How to find out the earliest compatible version of a library?

    Hello.

    If I create a Qt-based program, and I package it for Linux, I need to indicate the dependencies. Obviously, it would not be a good idea to ask my users to upgrade to the latest versions of dependencies unnecessarily. So how do I find out what is the earliest version of a dependency that will support my app correctly? Is trial and error the only way?

    Thanks.
    Penguin #395953 using Qt for open-source development on X11 using C++ and
    Python via PyQt

  2. #2
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to find out the earliest compatible version of a library?

    Quote Originally Posted by jamadagni
    Obviously, it would not be a good idea to ask my users to upgrade to the latest versions of dependencies unnecessarily.
    Why should you be any different from Redhat?

    Quote Originally Posted by jamadagni
    So how do I find out what is the earliest version of a dependency that will support my app correctly? Is trial and error the only way?
    The general rule of thumb is that libraries should be backwardly compatible within their minor version. For example, A program written with qt-4.1.4 should work fine with qt-4.1.0. Libraries should also be "forward" compatible within their major version. A program written with qt-4.0.0 should work with qt-4.2.0.

    But the Open Source world is a very undisciplined place, and many libraries do not follow these rules. GNU is one of the worst offenders, despite being the author of some very good guidelines on the subject (look in the libtool docs for it).

    A good testing methodology is to keep some older live CDs around, and test your binary with those.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to find out the earliest compatible version of a library?

    When it comes to Qt, if a new method comes in, it is always marked in the docs along with the minor number (or release, if it happened so) where it was introduced. You can track the version number you need this way.

    Another way is to try your app with a low-numbered version and if it fails, try a higher-numbered one until you get a running app.

    Of course one thing is binary compatibility and another is proper functoning of the application. Some apps won't work with particular versions because they use a code which contains bugs in that particular (and probably also earlier) version of the library.

    So the best way is just to know which version will work fine and why, based on your own experience while writing the code.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.