[英]Swift Preprocessing Error: Expected end of line in preprocessor expression
好吧,我正在解決一個關於cocoa pods' architecture 中重復符號的問題。 在接受的解決方案中使用post_install
安裝 pod 后,我構建了 xcworkspace 項目,但遇到以下錯誤:
錯誤是:預處理器表達式中的預期行結束。
在線: #if HAVE_FULLFSYNC
方法中: SyncFd(int fd, const std::string& fd_path)
文件的位置是:Pods/Pods/leveldb-library/env_posix.cc
我添加的引發這一系列問題的 Pod 是來自此處的“CodableFirebase”。
這是我的 Podfile:
platform :ios, '13.2'
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited), PodsDummy_Pods=SomeOtherNamePodsDummy_Pods'
end
end
end
target 'ShoeSwiperMenus' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for ShoeSwiperMenus
# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod ‘FirebaseUI/Auth'
pod 'FirebaseUI/Google'
pod 'FirebaseUI'
pod 'MaterialComponents/Buttons'
pod 'MaterialComponents/Buttons+Theming'
# pod 'MaterialComponents/schemes/Color'
pod 'Shuffle-iOS'
pod 'JGProgressHUD'
pod 'LBTATools'
pod 'CodableFirebase'
end
刪除post_install
塊時,我回溯到我原來的錯誤是:
ld:架構 x86_64 的 202 個重復符號。
clang:錯誤:linker 命令失敗,退出代碼為 1(使用 -v 查看調用)
我在這里真的超出了我的深度......我什至不知道如何開始解決這個問題(谷歌上沒有)。 請幫忙!
我剛剛將你的 Podfile 添加到一個空項目中,得到了同樣的錯誤,然后刪除了post_install
塊並且能夠無錯誤地構建。
因此,刪除post_install
塊。 無論它應該解決什么問題,它都會創造這個問題。
另外,我建議添加inhibit_all_warnings!
到 Podfile。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.