Ubuntu Eclipse G++编译出错?
错误信息 1:make:***[workspace/project/****.o] Error1.
错误信息 2 : no match for ‘operator<’ in ‘__first2.std::_List_iterator<_Tp>::operator* [with _Tp = CSimpleIniTempl<char, SI_GenericNoCase<char>, SI_ConvertA<char> >::Entry, std::_List_iterator<_Tp>::reference = CSimpleIniTempl<char, SI_GenericNoCase<char>, SI_ConvertA<char> >::Entry&]() < __first1.std::_List_iterator<_Tp>::operator* [with _Tp = CSimpleIniTempl<char, SI_GenericNoCase<char>, SI_ConvertA<char> >::Entry, std::_List_iterator<_Tp>::reference = CSimpleIniTempl<char, SI_GenericNoCase<char>, SI_ConvertA<char> >::Entry&]()’.
求路过的大婶大叔、大哥大姐给点儿指点,我以为是G++编译选项设置有问题,比如 -frepo 什么的,但是试过了能找到的全部选项,都无济于事!这都是什么错误呢? Ubuntu Eclipse G++ 编译出错 .o生成失败
[解决办法]
你说 "被报错的那个文件我之前在我的Qt程序中使用过,完全是没有问题的",那把文件内容帖上来,要是太长就算了。
查了一下 g++-4.7.0(手头没有 4.6) list.tcc line 305,是这个
if (*__first2 < *__first1)
00320 #if defined(_MSC_VER) && _MSC_VER <= 1200
00321
00322 bool operator<(const Entry & rhs) const { return LoadOrder()(*this, rhs); }
00323 bool operator>(const Entry & rhs) const { return LoadOrder()(rhs, *this); }
00324 #endif