没有找到Boost /lexical_cast.hpp
boost/lexical_cast.hpp not found
在我不幸删除的另一个项目中,我能够使用Boost。我在项目配置中添加了库,然后声明
#include <boost/lexical_cast.hpp>
一切正常
现在在我的新项目中,我得到错误
boost/lexical_cast.hpp not found
我已遵照http://www.boost.org/doc/libs/1_55_0/more/getting_started/windows.html#link-from-within-the-visual-studio-ide
上的指示我已将boost_1_58_0libs的路径添加到链接器->通用->附加库。
但是,现在编译器会抛出上面的错误。
有谁知道我可能做错了什么吗?我没有改变任何关于Boost。你读错章节了
那一章是关于将Boost对象文件链接到您的项目,但是Boost。LexicalCast是一个仅限头文件的库,与此相关的是介绍性IDE设置指令(在同一页面上)。
我找到了解决方案。Boost网站上的说明是错误的。
在这里找到的是正确的:https://elektron9.wordpress.com/2014/09/10/configuring-c-boost-libraries-for-visual-studio/
我必须做以下额外的工作使它工作:
C/c++所有的选项其他包含库在这里添加Boost的路径(而不是官方文档所说的Boost/lib或Boost/libs)
相关文章:
- 如何理解C++标准N3337中的expr.const.cast子句8
- C++Cast运算符过载
- 错误:"cast"未命名类型void setCastDescription(std::string
- 通过使用 const-cast 的非常量引用来延长临时的寿命
- "(void) cast"与功能有什么区别 "__attributes__"来沉默未使用的参数警告?
- C++:"Expected '(' for function-style cast or type construction"错误
- 为什么选择 g++ 给予者:"error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]"
- Gtk+ g_signal_connect() 和 C++ lambda 会导致"invalid cast"错误
- Shared_ptr cast vs static_cast speed
- 在 iOS 上使用 Aruco 构建 OpenCV 时"Functional-style cast from id to double is not allowed"
- 覆盖 CAST 运算符(我认为它被称为向下转换)
- C++错误,隐 <function-style-cast> 式要求使用模板化类一次调用多个构造函数的多个转换
- 如何修复<function-style-cast>错误:无法从'initializer list'转换为asdending比较<W>(模板函子)
- C++ C++ 中的函数声明,键入 CAST
- static_cast会丢弃错误,但C风格的演员cast有效
- C++ cast char * to unsigned char
- 禁用 Clang 中的"cast from pointer to smaller type uint32_t"错误
- 是否可以使用gcc 3.3版修复与int*cast相关的Sun Solaris OS 5.8分段故障
- C++ const-cast 一个引用
- 错误 C2440: 'type cast':无法从 'bool' 转换为 'CString'