導入oc動態庫(framework)到C++項目中混編出現的問題


1.Could Not build module 'xxx'

解決:change In target setting the "Allow Non-modular Includes in Framework modules" setting to YES.

 

2.Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modul

解決:在target-build settings - Apple Clang - Custom Compiler Flags ,將Other C++ Flags選項debug和release加上-fcxx-modules

 

3.'string' file not found:

解決:在target-build settings - Apple Clang - Language,將Compile Sources As改為Objective-C++

 

4. [!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `xxxxxx` to `Target Support Files/Pods-xxxxxx/Pods-xxxxxx.debug.xcconfig` or include the `Target Support Files/Pods-xxxxxx/Pods-xxxxxx.debug.xcconfig` in your build configuration (`ios/UserConfigIOS.debug.xcconfig`).

解決:修改debug.xcconfig文件,增加

#include "../Pods/Target Support Files/Pods-xxxxxx/Pods-xxxxxx.debug.xcconfig",xxxxx為targets名。

release文件同樣方式修改。

 

5. Cannot synthesize weak property in file using manual reference counting

 解決:Weak Reference In Manual Retain Release 改為 YES

 

6.Xcode fails to build: “Unable to resolve build file: XCBCore.BuildFile”

解決:XCode > Preferences > Locations > Derived Data目錄,刪除模擬器緩存文件,退出xcode重新打開再編譯


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM