简体   繁体   中英

Where does mac osx app require dependent libraries?

I have built a Qt project under mac, but I have problems executing.

Its dependencies have several dylib .

When building the project, the make tool only asks for one of the libs (for example lib.1.0.0,dylib out of lib.1.dylib, lib.1.0.dylib, lib.1.0.0.dylib, lib.1.0.0.0.dylib) - so I know to put it in the .pro file

Some look like links - but it is not always the lib version that looks like a file that is required as a dependency.

But at run time, I don't know which dylib I need, and where to put it. I tried to place all 4 lib versions in the folder where the app was created - the project folder - but the app didn't execute.

Having done the same in Linux, I had to put the libs in a place set on path - like /usr/local/libs

Where does mac like its libs (shared libs ?) in order to run ?

You should read this document on deploying Qt applications. It will answer your questions. Moving your libraries to a system library path is usually not a good idea.

http://qt-project.org/doc/qt-5/macosx-deployment.html

To sum this up though you need to change the binaries to tell them where the libs are using the otool command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM