Sunday, October 17, 2021

[Solved] code signature not valid for use in process using Library Validation

So I was working on a C++ project on Xcode, and I updated to the latest version of Xcode with recommended default settings; then I started having the following errors:

dyld: Library not loaded: /usr/local/lib/libcryptopp.dylib

  Referenced from: /Users/devharsh/Library/Developer/Xcode/DerivedData/server-bohvcuztzndrrzhcoglrvuijfasj/Build/Products/Debug/server

  Reason: no suitable image found.  Did find:

/usr/local/lib/libcryptopp.dylib: code signature in (/usr/local/lib/libcryptopp.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

/usr/local/lib/libcryptopp.dylib: code signature in (/usr/local/lib/libcryptopp.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

/usr/local/lib/libcryptopp.dylib: code signature in (/usr/local/lib/libcryptopp.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

Program ended with exit code: 9


Solution:
  • Go to Xcode > Targets > Build Settings
  • Scroll down and go to the Signing tab
  • Click on "Enable Hardened Runtime" and set it to "No"
  • Recompile, and it should be fixed


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.