1. The static library contains category (category)
If the static library contains category, sometimes the "method cannot find" error is reported in a project that uses a static library (unrecognized selector sent to instance)
Solution: Configure other Linker flags as-OBJC in a project that uses a static library
2.IOS compilation error: Objc-class-ref in APPDELEGATE.O solution |2015-01-23 09:50 |14695 people Reading
xcode6.0 upgrade to xcode6.1, the program compiled error, errors are as follows: This is a very common error, many projects after the version of the Xcode, there will be a similar problem.
Undefined Symbols for Architecture x86_64:
"_objc_class_$_qqapiinterface", referenced from:
Objc-class-ref in APPDELEGATE.O
"_objc_class_$_sharesdk", referenced from:
Objc-class-ref in APPDELEGATE.O
Objc-class-ref in RECIPEDETAILVIEWCONTROLLER.O
Objc-class-ref in SHOWVIEWCONTROLLER.O
Objc-class-ref in VIDEO_SHOW.O
"_objc_class_$_tencentoauth", referenced from:
Objc-class-ref in APPDELEGATE.O
"_objc_class_$_wxapi", referenced from:
Objc-class-ref in APPDELEGATE.O
"_objc_class_$_weiboapi", referenced from:
Objc-class-ref in APPDELEGATE.O
"_objc_class_$_yxapi", referenced from:
Objc-class-ref in APPDELEGATE.O
Ld:symbol (s) not found for architecture x86_64
Clang:error:linker command failed with exit code 1 (use-v to see invocation)
Solution:
Xcode upgrade to 6.1.1 By default allows all apps to be compiled with 64-bit compilers. originally in the Xcode6.0 when the default architectures only (arm7,armv7s), to 6.1.1 by default on the arm64 parameters.
Change build active architectures only to NO.
2. Remove the arm64 parameter from the bottom valid architectures to remove it.
Or:
Double-click Architectures, select Other, delete $ (arch_standard), and then increase armv7 and armv7s (write on: $ (archs_standard_32_bit)).
3.clean build again.
Result settings such as:
At present, after the setup is complete, the problem is solved smoothly, we have a better solution, welcome to discuss!
Problems and solutions for hitting static libraries