I am trying to link library libssh2.1.dylib in my iPhone Xcode project, but when I try I get this error, I'll link it. If I do not add it as a framework, I do not get the symbols error. Now / user / matte / documents / development / iphone app / portcancer / lib / libseash-2.1, dllib is not the correct path to that file. I downloaded the library from the internet and the path of the author's computer. I have a completely different place in the file. How do I change the route reference? I get this error:
dyld: Library has not been loaded: / users / mat / document / development / iPhoneApps / PortScanner / lib / libssh2.1.dylib: / var / mobile / Application / 5353E047-05FE-42E4-8F32-617E8D02A11D / port scanner.app / port scanner reason: image not found
You can use install_name_tool to change the path name installed on the .dylib file:
Example of an Install Name:
install_name_tool -id & lt; Yourpath & gt; /libssh2.1.dylib / user / matte / document / development / iPhoneApps / Portscanner / lib / libssh2.1.dylib
- The first parameter is the path you want < / Li>
- The actual path of the file is the second parameter, so drag the file from the finder
Also replace the dependency name, and you use the same tool to do so You can:
install_name_tool -change & lt; Old Path & gt; & Lt; New path & gt; & Lt; Library name & gt;
What you can do if you are using the current name otool so you can confirm the change with otool like this: otool -d libssh2.1.dylib Dependency with
and otool -l libssh2.1.dylib
or you can get the source code and rebuild it with the current path in its own right Are there.
If you need a relative path then you should change your name to @ rpath / libssh2.1.dylib. And add path to your project settings.
Comments
Post a Comment