iOS library references the resulting bug-apple LLVM 5.1-language

Source: Internet
Author: User

Objective-c's advantage is compatible with C + + code, so we can easily in the project to the C + + implementation of the library to use, but the use of the need to set some places, because there is no set up will bring a very strange problem


Here are the errors that the compiler reported when using these libraries, and you can see that the error of the report is very confusing.



At first I thought it was Target's header search path was not set correctly, so it was a long time in build settings.


Later consulted a lot of masters, just know that this is the library code in the reference C + + 's underlying type is not a reference to the cause, we need to reference the corresponding C + + library class set. The main is to set the compilation type of this class,


There are two methods of setting up

  • There's an Apple LLVM 5.1-language under Build settings, and we can set up how our code compiles, like


The default is according to file Type, so Xcode will compile to find the settings for each OC file, where the OC file is set in the show in file inspector of the. m file, as


We can choose a different type


The default is Objective-c Sourcce, if we introduce a library using C + + code implementation, we need to set the file to Objective-c++ source, so that Xcode will not be generated at compile time to find __char16_t this error.

  • Another option is to set up directly in the Apple LLVM 5.1-language of build settings, which is the compile Sources as setting we saw earlier, where the achievement line is set directly

iOS library references the resulting bug-apple LLVM 5.1-language

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.