[英]React Native IOS build clang: error: linker command failed with exit code 1 (use -v to see invocation)
[英]Can't build iOS project with boost: error: linker command failed with exit code 1 (use -v to see invocation)
我通過brew包管理器將Boost添加到我的iOS項目中:
brew install boost
然后將標題路徑添加到項目設置:
/usr/local/**
現在項目沒有構建錯誤:
ld: file not found: ~/Library/Developer/Xcode/DerivedData/ios-hgivqqzmkrkxlvdazbhavxnxtxod/Build/Intermediates/ios.build/Debug-iphonesimulator/ios.build/Objects-normal/x86_64/TLRPCmessages_searchGifs.o clang: error: linker command failed with exit code 1 (use -v to see invocation)
DerivedData/.../x86_64
文件夾不包含任何*.o
文件(僅限.d
, .dia
和.dat
),為什么它只涉及一個?
/usr/local/Cellar/boost/1.60.0_1/include
,並且構建錯誤變為此問題
但是我無法理解答案 - #include <cstddef>
已經存在於boost中,編譯器是Apple LLVM:
我該如何修復這個錯誤?
我手動解決了我的問題,但不記得怎么做。 無論如何,我的解決方案很糟糕,因為應用程序大小超過100 MB!
CocoaPods幫助了我, boost
pod已經存在。
只需向Podfile
添加行:
pod 'boost'
並在項目目錄中運行pod install
。 這個pod項目的構建沒有錯誤,應用程序的大小也不是很大。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.