Why macOS app requests exactly 5.dylib libraries?
-
Hi!
After building application in macOS I searched its dependencies by otool -L. Command result is equal to target link libraries' list, but Qt libraries have 5.dylib extension in it instead of .dylib.
Why it's happended in this way?
Maybe it's common way to handling with dependencies. Then how CMake know so need to add to rpath 5.dylib libraries?
Thanks for your help.
-
I would guess it's somewhere deep inside the FindQtFOO.cmake modules where this is defined. But why do you want to change it/what's your problem with this? You can not mix Qt5 and Qt6 so linking against .5.dylib is perfectly fine.
-
Hi,
It's not appended, that's the version of the library. It works in a similar fashion as the so files on Linux.
It allows to differentiate between major versions so you don't unexpectedly mix incompatible versions.
-
I would guess it's somewhere deep inside the FindQtFOO.cmake modules where this is defined. But why do you want to change it/what's your problem with this? You can not mix Qt5 and Qt6 so linking against .5.dylib is perfectly fine.
@Christian-Ehrlicher I just woder why exactly this extension required but, for example, not 5.15.dylib.
-
Hi,
It's not appended, that's the version of the library. It works in a similar fashion as the so files on Linux.
It allows to differentiate between major versions so you don't unexpectedly mix incompatible versions.
@SGaist so there is some naming convention. Do you khow some references to read?
-
There's a whole article on the subject in Apple's documentation under Dynamic Library Design Guidelines.