简体   繁体   English

无法使用boost构建iOS项目:错误:链接器命令失败,退出代码为1(使用-v查看调用)

[英]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 ),为什么它只涉及一个?


Also I tried change header path to non-recursive: /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.

相关问题 React Native IOS build clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用) - React Native IOS build clang: error: linker command failed with exit code 1 (use -v to see invocation) 使用PODS构建时出现链接器错误-链接器命令失败,退出代码为1(使用-v查看调用) - Linker error when I build using PODS - linker command failed with exit code 1 (use -v to see invocation) 链接器命令失败,退出代码为1(使用-v查看调用)错误? - linker command failed with exit code 1 (use -v to see invocation) error? 错误:链接器命令失败,退出代码为1(使用-v查看调用) - error: linker command failed with exit code 1 (use -v to see invocation) 错误“链接器命令失败,退出代码为1(使用-v查看调用)” - error “linker command failed with exit code 1 (use -v to see invocation)” 错误链接器命令失败,退出代码为 1(使用 -v 查看调用) - Error linker command failed with exit code 1 (use -v to see invocation) react-native ios 构建错误 - clang:错误:Z3175B426046787EECE7377387340B982 命令调用失败,退出代码1 - react-native ios build error - clang: error: linker command failed with exit code 1 (use -v to see invocation) 由于“链接器命令失败,退出代码为1(使用-v查看调用),因此无法在El Capitan上为Xcode 7项目构建Develop分支” - Can not build Develop branch for Xcode 7 project on El Capitan due to “linker command failed with exit code 1 (use -v to see invocation)” 离子应用程序构建失败,错误“链接器命令失败,退出代码为1(使用-v查看调用)” - ionic app build fails with error 'linker command failed with exit code 1 (use -v to see invocation)' Xcode构建错误链接器命令失败,退出代码为1(使用-v查看调用) - Xcode build error Linker command failed with exit code 1 (use -v to see invocation)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM