Unknown type name & #39; NSString & #39;

Source: Internet
Author: User

If you see a problem today, the editing project prompts "Unknown type name 'nsstring', as shown in figure

 

The exception occurs because ZipArchive is added to the project (a third-party open-source decompression library)

 

Generally, the "Unknown type name" header file is referenced by each other. This can be ruled out because the source code is mixed with c \ c ++ and oc,

Considering the new XCode compilation file type, I tried several solutions. The following three solutions can solve the problem.

 

Solution 1:

Select All. c files and change the attribute identity and type to Objective-C Source.

Solution 2:

Select All. c files and change. c to. m.

 

Solution 3:

Change Compile Sources As to Objective-C ++

Solution 3: Because the compilation type of all files is modified, all other prompts, including c and c ++ Code, may be incorrect. However, some prompts may be incorrect. simply modify the settings as prompted.

Related Article

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.