Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Multiple dylib versions created



  • Why multiple versions of dylibs are created in Mac and I had to include 2 different versions of dylib to make it work in another application.Where if i include one , it asks for another version?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What library are you talking about ?
    What versions ?
    What are you trying to do ?
    What version of macOS ?
    What version of Qt ?
    What version of Xcode ?



  • @SGaist Hi, I wanted to create a dynamic library in mac using Qt Libraries project option.
    So, When write a sample code and build it. It Creates more than one version like: -
    libSample.1.0.0.dylib
    libSample.1.0.dylib
    libSample.1.dylib
    libSample.dylib
    My Question is why it created these 4 different versions of same library and when I integrate libSample.1.0.0.dylib this in an other application, It builds but asks for libSample.1.dylib for complete execution of my application which integrates this sample library i created.

    I am using Qt creator 4.10.2 based on Qt 5.13.2 (Clang 10.0 (Apple), 64 bit) and using Xcode 9.
    i am using macos 10.14.3

    Thanks in advance.


  • Lifetime Qt Champion

    That's how library numbering is working in Unix style OSs. Same goes for Linux with their .so files.

    This allows you to link to a more or less precise version of a library. The numbers are major/minor/patch. You usually link to the unnumbered version but if you need some specific version because of some specific behavior that has changed, you can link using the version number.


Log in to reply