Completely resolve _objc_class_$_ a filename ", referenced from: issue

Source: Internet
Author: User
PS: This article is reproduced and come, if there is a conflict, please contact me, will be deleted immediately.

This problem always occurs when you use a static library recently. Here's a summary of my solution:

1.. m file not imported
Add an error file to the compile Sources in build phases

2.. framework file not imported
Static library compilation often requires some library support to see if you have a library file that is not imported
It is also added in the link Binary with libraries in build phases

3. Repeated compilation, you may have copied the previous two places, added here two times, deleted when the system does not delete the default compiled reference address
Search Paths in Build settings delete addresses that are not used in library search Paths

4. The last problem, out of the static library generation above. There are two static libraries generated by the system compilation, one called by a real machine, and one called by a simulator.
When you import the emulator static library in the real machine test, the operation will be error, and also the call to the real machine static library during the simulator test will be error.

It is also easy to solve this problem by merging two static libraries and generating a compatible static library.

Find two static library files through show in Finder, copy two files to a folder, of course rename them, or overwrite them.
Below open the terminal, CD to the folder that holds two files.
By lipo[space]-create[space] [Real machine static library file name] [space] [emulator static library filename] [space]-output[space] [merged file name]

Then you can import this generated file into your project.

Completely resolve _objc_class_$_ a filename ", referenced from: Problem (GO)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.