Boost C ++:编译错误(Boost C++ : compilation error)

编程入门 行业动态 更新时间:2024-10-25 02:22:06
Boost C ++:编译错误(Boost C++ : compilation error)

很长一段时间我一直在使用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 .... #endif

I have just remove this code and all works fine !

Of course, SUPPORT_THIS_FEATURE was NOT defined !

更多推荐

本文发布于:2023-08-02 20:16:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1379988.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   Boost   error   compilation

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!