Deploying my application with my own library is failed.
-
Hi,
My environment is below,
Mac mini, MacOS M1 64bit, Sonoma 14.2.1
XCode: 15.2I use Qt 6.5.3, and set target path as below,
unix {
target.path = /usr/local/lib
}and create my own library, and build it in my release-build folder.
Next, I copy my library(libMymac.1.0.0.dylib) to /usr/local/lib,
and create symbolic-link files in the same path as below,
libMymac.dylib
libMymac.1.dylib
libMymac.1.0.dylibI also create an application (Mymacapp), and load my own library in the pro file as below,
LIBS += -L$$PWD/Mymac/ -lMymac.1.0.0
and build my application, and it works fine.Now, I try to deploy my application like this,
./macdeployqt Mymacapp.appit complains <ERROR: no file at "/usr/lib/libMymac.1.dylib">.
Here my question is, I set target.path = /usr/local/lib,
why I get the error path /usr/lib ??May I know how I can solve this issue?
Thanks.
Have a nice day. -
@Wunian said in Deploying my application with my own library is failed.:
why I get the error path /usr/lib ??
I guess the macdeployqt tool does not look in /usr/local/lib by default
-
Hi,
Check your library with
otool -L
and see what path it contains. You will likely not see/usr/local/lib
. You should set it properly there. -