When trying to compile the software for iOS 5, XCode 4.2 throws an error:
ld: library not found for -lz.1.2.3
I found this post that tells me to replace 1.2.3. with 1.2.5
https://github.com/dbloete/ioctocat/issues/107
After doing what the link has suggested, it worked for XCode 4.2 but fails for older versions for XCode with the error
ld: library not found for -lz.1.2.5
Has anyone encountered the above situation? How can I resolve this so that it will not fail between the different versions of SDK?
The “/usr/bin/ld cannot find -lc” error is related to the C development library named libc-dev . So installing the libc-dev can resolve this error. The “/usr/bin/ld cannot find -lltdl” error is related to the C development library named ltdl-dev . So installing the libtdl-dev can resolve this error.
So you are responsible for the problem that some libraries cannot be found. In case that these libraries are available on your system, they seem to be located in non-standard directory locations. Use -R directory for the final compiler call to tell the linker the directory where the libraries are located.
In case that these libraries are available on your system, they seem to be located in non-standard directory locations. Use -R directory for the final compiler call to tell the linker the directory where the libraries are located. More than a single -R directory option is possible.
Show activity on this post. LD_LIBRARY_PATH is suitable for short tests, but since there is only one variable, it is awkward to use when you might have multiple applications with custom libraries. The usual way for Debian/Ubuntu is to add it to the loader's configuration, e.g., a file under
Just use -lz, there's no need to use the versioned link to it. So remove libz-1.2.5.dylib from frameworks and add libz.dylib.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With