c++ - 不能在 xCode 中使用 boost

标签 c++ xcode boost

当我尝试在 xCode 中使用 boost 库时,我不断收到错误消息。 我已经像教程说的那样链接了标题和链接库,但我仍然遇到错误

> #include <iostream>
> #include <string>            // std::string
> #include <sstream>           // std::stringstream
> #include <initializer_list>
> #include <vector>
> #include <boost/type_index.hpp>
> using std::cout;
> using std::endl;

在 boost 索引处,当我尝试构建时,我的编译器说“找不到‘boost/type_index.hpp’文件”..

我该如何解决这个问题?

最佳答案

在您的 Xcode 项目build设置中,您必须确保在 header 搜索路径中找到/选择它。 (例如/usr/local/boost_1_60_0/include/)

关于c++ - 不能在 xCode 中使用 boost,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49394758/

相关文章:

iphone - Xcode - 如何更改应用程序/项目名称 : what do I need to to update and check?

swift - 尝试进行涉及 webview 的 UI 测试时 Xcode 崩溃

c++ - 错误 : The following Boost libraries could not be found

c++ - 使用 boost::filesystem 时无法链接

c++ - 为什么在 Boost Turtle 中使用 MOCK_NON_CONST_METHOD_EXT 作为算子 float() ?

c++ - 鼠标按下时 Gtk::Widget on_enter_notify?

c++ - 非重复排列

ios - Swift 和 Objective-C 无法分配全局变量

c++ - 在 VC++ 2010 项目中使用 Boost 序列化库

c# - 二进制搜索算法的扩展,用于查找要在数组中搜索的键值的第一个和最后一个索引