how change the @rpath value on macos
-
wrote on 22 Jan 2019, 09:32 last edited by
Hi:
I developed a qt project on macos, my executable file link the qt framework like this :
@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.11.0, current version 5.11.3)now I want to change the @rpath to the custom directory path which in my .app content directory, what should I do in my .pro file, thanks a lot!
-
Hi:
I developed a qt project on macos, my executable file link the qt framework like this :
@rpath/QtWidgets.framework/Versions/5/QtWidgets (compatibility version 5.11.0, current version 5.11.3)now I want to change the @rpath to the custom directory path which in my .app content directory, what should I do in my .pro file, thanks a lot!
-
wrote on 22 Jan 2019, 09:47 last edited by
it not work on macos
-
@Princein said in how change the @rpath value on macos:
it not work on macos
Can you give more details ?
-
wrote on 23 Jan 2019, 14:45 last edited by
Had a similar problem, I resorted to use the tools inside Xcode's toolchain, there are 2 of them: otool and install_name_tool
otool you use to dump what .dlls the app will try to load. Easiest is to first navigate down to the MacOS subdirectory where the .exe file is located, then to list the load command (assuming your app is called untitled) try:
otool -l untitled
To change the @rpath loading commands, you use install_name_tool, for example:
install_name_tool -change @rpath/QtWidgets.framework/Versions/5/QtWidgets @rpath/YourCustomDirectoryPath untitled
1/6