1. ホーム
  2. arm

ios アーキテクチャ arm64 の未定義シンボル: エラー解決

2022-02-19 12:21:49
When using cocoapod to add a third-party library, the project will sometimes open with a compilation error, the error is as follows
 


Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_AFHTTPRequestOperationManager", referenced from:
      objc-class-ref in AFNetworkingUtil.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


1.

AFNetworkingUtil is a class written by myself, which uses the header file of the AFNetworking framework in the pod

2, there is a compilation error in stackoverflow find this Q&A http://stackoverflow.com/questions/19213782/undefined-symbols-for-architecture-arm64?rq=1
3. Steps to resolve
a. Build Setting -> Architectures & Valid Architectures Check for correct configuration

b. Make sure the picture is correct, and then add a new image to the
Build Setting -> linking Add the following configuration


1. AFNetworkingUtil is a class written by myself, which uses the header file of the AFNetworking framework in the pod
2, there is a compilation error in stackoverflow find this Q&A http://stackoverflow.com/questions/19213782/undefined-symbols-for-architecture-arm64?rq=1
3. Steps to resolve
a. Build Setting -> Architectures & Valid Architectures Check for correct configuration

b. Make sure the picture is correct, and then add a new image to the
Build Setting -> linking Add the following configuration