今天在object-c 和swift 混編的時候出現錯誤:could not build module foundation
今天在object-c 和swift 混編的時候出現錯誤:could not build module foundation
當我把oc程式碼匯入swift工程時候沒有出來,編譯是正常的,當我建立pch檔案引用時候就出現could not build module foundation
這個問題折騰了好久,在網上找到解決辦法,我把這個問題記錄下,希望能幫到有需要的人
解決方法:
在pch 找到需要引用的的標頭檔案前面加上#ifdef OBJC 要匯入的標頭檔案 #endif
如下圖:
https://stackoverflow.com/questions/19723392/adding-c-file-causes-pch-error
相關文章
- vagrant下composer安裝laravel-wechat時候,出現could not delete的錯誤Laraveldelete
- 雲音樂 Swift 混編 Module 化實踐Swift
- OC和Swift混編Swift
- OC和Swift混編經驗Swift
- iOS UMeng OC和Swift混編iOSSwift
- Objective-C和Swift混編ObjectSwift
- 編譯專案時出現的錯誤 線上等回覆編譯
- 裝完PHP後重起Apache的時候出現"Undefinedsymbols"錯誤(轉)PHPApacheUndefinedSymbol
- 編譯開源 Swift Foundation 庫編譯Swift
- 進階-Swift和OC混編生成 swift pod私有庫Swift
- 我安裝JIVE,在setup時,按繼續候,出現錯誤。
- 裝完PHP後重起Apache的時候出現"Undefined symbols"錯誤(轉)PHPApacheUndefinedSymbol
- 在使用jbuild7執行jive論壇的時候出現下列錯誤UI
- 解決Centos7 yum 出現could not retrieve mirrorlist 錯誤CentOS
- 編譯EJB出現錯誤的解決編譯
- 考OCP在做vue和oracle賬號關聯的時候容易出現的錯誤:third invalid attemptVueOracle
- 使用rman執行recover database 的時候出現RMAN-06054的錯誤提示Database
- oracle 安裝的時候出現PRVF-0002 : could not retrieve local node nameOracle
- su的時候報:could not open sessionSession
- 如何解決 Angular custom library module 在 ng build 時無法被識別的錯誤AngularUI
- RMAN備份時出現RMAN-06056: could not access datafile 6 錯誤,解決方法!!
- WireMock 的時候報錯:No response could be served as there are no stub mappings in this WireMockREMMockAPP
- 編譯包的時候發生pls-00201錯誤編譯
- 優雅的開發 Swift 和 Objective-C 混編的 FrameworkSwiftObjectFramework
- flutter和Android混編下出現“No implementation found for method xxxx on channel”錯誤FlutterAndroid
- LogMeIn Free遠端登入的時候出現“Terminal Server Display is Inactive”錯誤Server
- Gradle專案Build的時候,頻繁報Unknown host 'jcenter.bintray.com' 錯誤GradleUI
- Objective-C 和 Swift 混編專案的小 Tips(一)ObjectSwift
- JDBC 連oracle 時出現錯誤,,求助???JDBCOracle
- 使用jsp:useBean的時候出錯!JSBean
- 編譯實體Bean出現如下錯誤.....編譯Bean
- Qt專案移動時出現的錯誤QT
- xcode 編譯opencv ios容易出現的錯誤XCode編譯OpenCViOS
- jbuilder編譯jive出現的錯誤,高手幫忙!!UI編譯
- 為什麼回覆貼子的時候又出現“空指標”錯誤指標
- Flask擴充套件包安裝出現錯誤:Could not find a version that satisfies the requirement ...Flask套件UIREM
- 京東App Swift 混編及元件化落地APPSwift元件化
- Qt5.3 列印示例時出現錯誤QT