很长一段时间我一直在使用Boost C ++库,当我使用Visual Studio 2012编译我的软件时,突然出现了奇怪的错误(调试64位)。 我完全不知道这个问题,“输出”并没有真正帮助我。
这是我得到的那种错误(输出):
_libraries\lib_Boost\boost/iterator/iterator_facade.hpp(847): error C2059: syntax error : ','还有以下一个:
_libraries\lib_Boost\boost/filesystem/operations.hpp(798): error C2678: binary '!=' : no operator found which takes a left-hand operand of type 'boost::filesystem::directory_iterator' (or there is no acceptable conversion) _libraries\lib_Boost\boost/filesystem/path.hpp(621): could be 'bool boost::filesystem::operator !=(const boost::filesystem::path &,const boost::filesystem::path &)' _libraries\lib_Boost\boost/filesystem/path.hpp(622): or 'bool boost::filesystem::operator !=(const boost::filesystem::path &,const boost::filesystem::path::string_type &)' _libraries\lib_Boost\boost/filesystem/path.hpp(623): or 'bool boost::filesystem::operator !=(const boost::filesystem::path::string_type &,const boost::filesystem::path &)' _libraries\lib_Boost\boost/filesystem/path.hpp(624): or 'bool boost::filesystem::operator !=(const boost::filesystem::path &,const boost::filesystem::path::value_type *)' _libraries\lib_Boost\boost/filesystem/path.hpp(625): or 'bool boost::filesystem::operator !=(const boost::filesystem::path::value_type *,const boost::filesystem::path &)' while trying to match the argument list '(boost::filesystem::directory_iterator, boost::filesystem::directory_iterator)'有人有想法可以帮助我找到这些错误的原因吗? 是否有一些可以帮助的编译选项?
我只有2个错误(很多时间!!)
谢谢
I'm working with the Boost C++ library since a long time and suddenly I got stranges error when I compile my software with Visual Studio 2012 (in debug 64 bits). I have absolutely no idea of the problem and the "output" does not really help me.
Here are the kind of errors I got (the output):
_libraries\lib_Boost\boost/iterator/iterator_facade.hpp(847): error C2059: syntax error : ','And the following one too :
_libraries\lib_Boost\boost/filesystem/operations.hpp(798): error C2678: binary '!=' : no operator found which takes a left-hand operand of type 'boost::filesystem::directory_iterator' (or there is no acceptable conversion) _libraries\lib_Boost\boost/filesystem/path.hpp(621): could be 'bool boost::filesystem::operator !=(const boost::filesystem::path &,const boost::filesystem::path &)' _libraries\lib_Boost\boost/filesystem/path.hpp(622): or 'bool boost::filesystem::operator !=(const boost::filesystem::path &,const boost::filesystem::path::string_type &)' _libraries\lib_Boost\boost/filesystem/path.hpp(623): or 'bool boost::filesystem::operator !=(const boost::filesystem::path::string_type &,const boost::filesystem::path &)' _libraries\lib_Boost\boost/filesystem/path.hpp(624): or 'bool boost::filesystem::operator !=(const boost::filesystem::path &,const boost::filesystem::path::value_type *)' _libraries\lib_Boost\boost/filesystem/path.hpp(625): or 'bool boost::filesystem::operator !=(const boost::filesystem::path::value_type *,const boost::filesystem::path &)' while trying to match the argument list '(boost::filesystem::directory_iterator, boost::filesystem::directory_iterator)'Does someone has an idea that can help me to find the reason of theses errors ? Is there some compilation options that can help ?
I only have theses 2 errors (a lot of time !!)
Thanks
最满意答案
我发现了这个问题,它与Visual Studio 2012 C ++编译器中的一个错误有关。
在一个完全不相关的文件中,我有一些像这样的代码:
#ifdef SUPPORT_THIS_FEATURE ... some code .... #endif我刚刚删除此代码,一切正常!
当然,没有定义SUPPORT_THIS_FEATURE!
I have find the issue, it is related to a bug in Visual Studio 2012 C++ compiler.
In a completely unrelated file I have some code like this :
#ifdef SUPPORT_THIS_FEATURE ... some code .... #endifI have just remove this code and all works fine !
Of course, SUPPORT_THIS_FEATURE was NOT defined !
更多推荐
发布评论