clang: error: no such file or directory: ‘/usr/lib/libz.dylib’
clang: error: no such file or directory: ‘/usr/lib/libiconv.dylib’
Command Ld failed with a nonzero exit code
These errors go away if I go to “Other Linker Flags” in Xcode and remove the above two lines for each build type, and replace them with -lz and -liconv.
The problem is, that each time I run the following command, the linker flags get replaced :
Thanks for your reply, I did use the search functionality and found that post, but was unable to understand the solution, and for some reason could not post any message on that thread. I followed the link as well, but still could not make sense of it.
As I could not post any reply to that thread, I asked a fresh question. I apologise for any inconvenience.
What the solution is, is still unclear to me though. If you have a moment, can you please explain?
Edit: perhaps there was some problem with my browser, as I was unable to post any reply to that thread earlier. Apologies for any inconvenience caused.
Edit: I tried again. Still do not have the ability to post to that thread.
I did read that post, and did add those lines, but adding them by itself didn’t seem to do anything. The same error show up:
clang: error: no such file or directory: ‘/usr/lib/libz.dylib’
clang: error: no such file or directory: ‘/usr/lib/libiconv.dylib’
The only way I have found to make them go away is by manually adding -lz and -liconv flags, which is why I was asking. I am using the simulator, and that thread seems to indicate it works only for device builds…
ok, any idea how to solve the libz libiconv problem ? Adding those lines does not seem to solve it, and so far the only solution I seem to have is adding -lz and -liconv flags manually, which is time consuming…