Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Eclipse为g++;不';T_Eclipse_G++ - Fatal编程技术网

Eclipse为g++;不';T

Eclipse为g++;不';T,eclipse,g++,Eclipse,G++,构建简单代码(示例如下)在eclipse上返回错误,而命令行中的g++不会返回错误。eclipse和g++都输出了行为相同的可执行文件(结果符合我的预期)。当代码不像我展示的示例那样简单时,这是很痛苦的。任何想法都值得赞赏 Env:EclipseIndigoCDT,Ubuntu 10.10 示例代码: //For test_boostStr() #include <boost/algorithm/string.hpp> #include <vector> #include

构建简单代码(示例如下)在eclipse上返回错误,而命令行中的g++不会返回错误。eclipse和g++都输出了行为相同的可执行文件(结果符合我的预期)。当代码不像我展示的示例那样简单时,这是很痛苦的。任何想法都值得赞赏

Env:EclipseIndigoCDT,Ubuntu 10.10

示例代码:

//For test_boostStr()
#include <boost/algorithm/string.hpp>
#include <vector>
#include <iostream>

//For test_boost_foreach()
#include <boost/algorithm/string/trim.hpp>
#include <boost/foreach.hpp>

void test_boostStr() {
    std::vector<std::string> strs;
    boost::split(strs, "string to split", boost::is_any_of("\t "));
    std::cout << strs.size() << std::endl;
    //  std::cout << strs.at(1) << std::endl;
}

void test_boost_foreach() {
    //std::vector<std::string> namespaces_;
    std::string namespaces_  = " tele op eration. ";
    std::cout << "managing namespaces: ";
    std::string out;
    std::string s;
    BOOST_FOREACH(s, namespaces_)
    {
        boost::trim(s);
        out += s + " ";
    }
    std::cout << out.substr(0, out.size() - 1) << std::endl;
}

int main(void) {
    test_boost_foreach();
}
Eclipse上“问题”选项卡中的生成结果:

Description Resource    Path    Location    Type
Invalid arguments '
Candidates are:
boost::mpl::not_<#0> * not_(#0 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
boost::mpl::not_<#0> * not_(#0 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
boost::mpl::not_<#0> * not_(#0 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
boost::foreach_detail_::auto_any<boost::foreach_detail_::foreach_iterator<#0,#1>::type> end(const boost::foreach_detail_::auto_any_base &, boost::foreach_detail_::type2type<#0,#1> *, mpl_::bool_<0> *)
boost::foreach_detail_::auto_any<int> end(const boost::foreach_detail_::auto_any_base &, boost::foreach_detail_::type2type<#0 *,#1> *, mpl_::bool_<1> *)
boost::foreach_detail_::auto_any<boost::foreach_detail_::foreach_iterator<#0,#1>::type> end(const boost::foreach_detail_::auto_any_base &, boost::foreach_detail_::type2type<#0,#1> *, mpl_::bool_<1> *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
boost::foreach_detail_::auto_any<boost::foreach_detail_::foreach_iterator<#0,#1>::type> begin(const boost::foreach_detail_::auto_any_base &, boost::foreach_detail_::type2type<#0,#1> *, mpl_::bool_<0> *)
boost::foreach_detail_::auto_any<#0 *> begin(const boost::foreach_detail_::auto_any_base &, boost::foreach_detail_::type2type<#0 *,#1> *, mpl_::bool_<1> *)
boost::foreach_detail_::auto_any<boost::foreach_detail_::foreach_iterator<#0,#1>::type> begin(const boost::foreach_detail_::auto_any_base &, boost::foreach_detail_::type2type<#0,#1> *, mpl_::bool_<1> *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
boost::foreach_detail_::auto_any<#0 *> contain(#0 &, mpl_::bool_<0> *)
boost::foreach_detail_::auto_any<#0> contain(const #0 &, mpl_::bool_<1> *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
boost::algorithm::detail::is_any_ofF<boost::range_value<#0>::type> is_any_of(const #0 &)
'   Prove.cpp   /ProvingGround  line 12 Semantic Error
Invalid arguments '
Candidates are:
#0 & split(#0 &, #1 &, #2, enum boost::algorithm::token_compress_mode_type)
'   Prove.cpp   /ProvingGround  line 12 Semantic Error
Invalid arguments '
Candidates are:
? * or_(#0 *, #1 *, #2 *)
? * or_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * or_(#0 *, #1 *, #2 *)
? * or_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * or_(#0 *, #1 *, #2 *)
? * or_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * is_array_(const #0 &)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * is_array_(const #0 &)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * is_array_(const #0 &)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * and_(#0 *, #1 *, #2 *)
? * and_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * and_(#0 *, #1 *, #2 *)
? * and_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * and_(#0 *, #1 *, #2 *)
? * and_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * and_(#0 *, #1 *, #2 *)
? * and_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * and_(#0 *, #1 *, #2 *)
? * and_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * and_(#0 *, #1 *, #2 *)
? * and_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
描述资源路径位置类型
无效参数'
候选人包括:
boost::mpl::not_*not(#0*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
boost::mpl::not_*not(#0*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
boost::mpl::not_*not(#0*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
boost::foreach\u detail\u::auto\u any end(const boost::foreach\u detail\u::auto\u any\u base&,boost::foreach\u detail\u::type2type*,mpl\u::bool\u*)
boost::foreach\u detail\u::auto\u any end(const boost::foreach\u detail\u::auto\u any\u base&,boost::foreach\u detail\u::type2type*,mpl\u::bool\u*)
boost::foreach\u detail\u::auto\u any end(const boost::foreach\u detail\u::auto\u any\u base&,boost::foreach\u detail\u::type2type*,mpl\u::bool\u*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
boost::foreach\u detail\u::auto\u any begin(const boost::foreach\u detail\u::auto\u any\u base&,boost::foreach\u detail\u::type2type*,mpl\u::bool\u*)
boost::foreach\u detail\u::auto\u any begin(const boost::foreach\u detail\u::auto\u any\u base&,boost::foreach\u detail\u::type2type*,mpl\u::bool\u*)
boost::foreach\u detail\u::auto\u any begin(const boost::foreach\u detail\u::auto\u any\u base&,boost::foreach\u detail\u::type2type*,mpl\u::bool\u*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
boost::foreach_detail_uu::auto_uany contain(#0&,mpl_uu::bool_*)
boost::foreach_detail_uuu::auto_uany contain(const#0&,mpl_uu::bool_u*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
boost::algorithm::detail::is_any_ofF is_any_of(const#0&)
'Prove.cpp/ProvingGround line 12语义错误
无效参数'
候选人包括:
#0和拆分(#0&、#1&、#2,枚举增强::算法::令牌压缩模式#类型)
'Prove.cpp/ProvingGround line 12语义错误
无效参数'
候选人包括:
? * 或(#0*、#1*、#2*)
? * 或(#0*,#1*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
? * 或(#0*、#1*、#2*)
? * 或(#0*,#1*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
? * 或(#0*、#1*、#2*)
? * 或(#0*,#1*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
? * is_数组(常数#0&)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
? * is_数组(常数#0&)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
? * is_数组(常数#0&)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
? * 和(#0*,#1*,#2*)
? * 和(#0*,#1*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
? * 和(#0*,#1*,#2*)
? * 和(#0*,#1*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
? * 和(#0*,#1*,#2*)
? * 和(#0*,#1*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
? * 和(#0*,#1*,#2*)
? * 和(#0*,#1*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
? * 和(#0*,#1*,#2*)
? * 和(#0*,#1*)
'Prove.cpp/ProvingGround line 23语义错误
无效参数'
候选人包括:
? * 和(#0*,#1*,#2*)
? * 和(#0*,#1*)
'Prove.cpp/ProvingGround line 23语义错误

我还没有解决这个问题(特别是在我使用boost时,似乎经常会发生这种情况),但根据本文,根本原因可能在于Eclipse的CDT插件。正如本页所讨论的,残酷的解决办法是关闭代码分析功能。

对于完全相同的方法,Thsi问题也发生在我身上。
Description Resource    Path    Location    Type
Invalid arguments '
Candidates are:
boost::mpl::not_<#0> * not_(#0 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
boost::mpl::not_<#0> * not_(#0 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
boost::mpl::not_<#0> * not_(#0 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
boost::foreach_detail_::auto_any<boost::foreach_detail_::foreach_iterator<#0,#1>::type> end(const boost::foreach_detail_::auto_any_base &, boost::foreach_detail_::type2type<#0,#1> *, mpl_::bool_<0> *)
boost::foreach_detail_::auto_any<int> end(const boost::foreach_detail_::auto_any_base &, boost::foreach_detail_::type2type<#0 *,#1> *, mpl_::bool_<1> *)
boost::foreach_detail_::auto_any<boost::foreach_detail_::foreach_iterator<#0,#1>::type> end(const boost::foreach_detail_::auto_any_base &, boost::foreach_detail_::type2type<#0,#1> *, mpl_::bool_<1> *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
boost::foreach_detail_::auto_any<boost::foreach_detail_::foreach_iterator<#0,#1>::type> begin(const boost::foreach_detail_::auto_any_base &, boost::foreach_detail_::type2type<#0,#1> *, mpl_::bool_<0> *)
boost::foreach_detail_::auto_any<#0 *> begin(const boost::foreach_detail_::auto_any_base &, boost::foreach_detail_::type2type<#0 *,#1> *, mpl_::bool_<1> *)
boost::foreach_detail_::auto_any<boost::foreach_detail_::foreach_iterator<#0,#1>::type> begin(const boost::foreach_detail_::auto_any_base &, boost::foreach_detail_::type2type<#0,#1> *, mpl_::bool_<1> *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
boost::foreach_detail_::auto_any<#0 *> contain(#0 &, mpl_::bool_<0> *)
boost::foreach_detail_::auto_any<#0> contain(const #0 &, mpl_::bool_<1> *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
boost::algorithm::detail::is_any_ofF<boost::range_value<#0>::type> is_any_of(const #0 &)
'   Prove.cpp   /ProvingGround  line 12 Semantic Error
Invalid arguments '
Candidates are:
#0 & split(#0 &, #1 &, #2, enum boost::algorithm::token_compress_mode_type)
'   Prove.cpp   /ProvingGround  line 12 Semantic Error
Invalid arguments '
Candidates are:
? * or_(#0 *, #1 *, #2 *)
? * or_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * or_(#0 *, #1 *, #2 *)
? * or_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * or_(#0 *, #1 *, #2 *)
? * or_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * is_array_(const #0 &)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * is_array_(const #0 &)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * is_array_(const #0 &)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * and_(#0 *, #1 *, #2 *)
? * and_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * and_(#0 *, #1 *, #2 *)
? * and_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * and_(#0 *, #1 *, #2 *)
? * and_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * and_(#0 *, #1 *, #2 *)
? * and_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * and_(#0 *, #1 *, #2 *)
? * and_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error
Invalid arguments '
Candidates are:
? * and_(#0 *, #1 *, #2 *)
? * and_(#0 *, #1 *)
'   Prove.cpp   /ProvingGround  line 23 Semantic Error