[英]Can't build iOS project with boost: error: linker command failed with exit code 1 (use -v to see invocation)
I append Boost to my iOS project via brew package manager: 我通过brew包管理器将Boost添加到我的iOS项目中:
brew install boost
Then add header path to project settings: 然后将标题路径添加到项目设置:
/usr/local/**
And now project doesn't builds with error: 现在项目没有构建错误:
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
folder doesn't contains any *.o
files (only .d
, .dia
and .dat
), why it talks only about one? DerivedData/.../x86_64
文件夹不包含任何*.o
文件(仅限.d
, .dia
和.dat
),为什么它只涉及一个?
/usr/local/Cellar/boost/1.60.0_1/include
, and build errors became as in this question
/usr/local/Cellar/boost/1.60.0_1/include
,并且构建错误变为此问题
But I can't understand answers - #include <cstddef>
already exists inside boost, compiler is Apple LLVM: 但是我无法理解答案 -
#include <cstddef>
已经存在于boost中,编译器是Apple LLVM:
How can I fix this bugs? 我该如何修复这个错误?
I solved my problem manually but did not remember how. 我手动解决了我的问题,但不记得怎么做。 Anyway my solution was bad because of application size enlarged over 100 Mbytes!
无论如何,我的解决方案很糟糕,因为应用程序大小超过100 MB!
CocoaPods helped me, boost
pod already exists . CocoaPods帮助了我,
boost
pod已经存在。
Just add row to Podfile
: 只需向
Podfile
添加行:
pod 'boost'
and run pod install
in project directory. 并在项目目录中运行
pod install
。 With this pod project was built without errors and application size was not so huge. 这个pod项目的构建没有错误,应用程序的大小也不是很大。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.