错误:命名空间“boost”没有成员“lexical_cast”?

时间:2013-03-23 12:28:57

标签: c++ boost include

即使我有这个包括:

#include "boost\lexical_cast.hpp"

这一行不会编译:

int versionInt = boost::lexical_cast<int>(version);

当我将光标置于lexical_cast上时,它显示“Error:namespace”boost“没有成员”lexical_cast“”。有什么问题?

顺便说一下,这两行都在同一个.cpp文件中。

编辑:当我编译时,它写道:1&gt; c:\ users \mickaël\ documents \ visual studio 2010 \ projects \ Spirit Arena \ Spirit Arena \ boost \ lexical_cast.hpp(24):致命错误C1083:无法打开包含文件:'boost / config.hpp':没有这样的文件或目录

编辑:出于某种原因,请包含&lt; fstream&gt;也不会工作...在lexical_cast之前我没有被删除的所有aditional标题确实有效。

编辑:我写了“#include”boots \ lexical_cast.hpp“”行,因为目录被复制到我项目的文件夹中。也许这与此有关?

0 个答案:

没有答案
相关问题