Eclipse C ++ for Mac设置(<iostream>修复)和纠错

我正在测试eclipse C ++ for Mac。 我有三个具体问题。

  • 这是Mac的经典iostream问题。 它不知道在哪里找到它。 所以在项目属性中添加iostream所在的路径(首选项 - > C / C ++常规 - >路径和符号 - >包含)。 现在iostream工作。 但我试图找到一种方法,我不必为每个新项目都这样做。 是否有特定的设置可以选择为每个新项目自动包含此目录?

  • eclipse是否需要xCode工作? 如果是的话,我怎么才能让日食在没有它的情况下工作? xCode占用6 GB。

  • 我在测试项目上看到一个错误(见下文),我不知道如何解决。 有关“链接器命令失败”的信息。 我似乎可以很好地编译常规C程序。 请注意,该项目在Visual Studio中正常工作。

    23:37:30 ****增量构建配置调试项目pointClass **** make all构建目标:pointClass调用:MacOS X C ++链接器g ++ -o“pointClass”./point.o ./test.o
    架构x86_64的未定义符号:“std :: istream :: operator >>(double&)”,引用来自:test.o中的_main“std :: ostream :: operator <<(std :: ostream&()(std :: ostream&))“,引用自:_main in test.o Point :: Point(double,double)in test.o Point :: Point(Point const&)in test.o”std :: ostream :: operator <<(double )“,引用自:_main in test.o Point :: Point(double,double)in test.o”std :: basic_string,std :: allocator> ::〜basic_string()“,引用来自:_main in test。 o“std :: ios_base :: Init :: Init()”,引用来自:test.o中的___cxx_global_var_init“std :: ios_base :: Init ::〜Init()”,引用来自:test.o中的___cxx_global_var_init“std :: cin“,引用来自:_main in test.o”std :: cout“,引用来自:test.o中的_main Point :: Point(double,double)in test.o Point :: Point(Point const&)in test.o“std :: basic_ostream>&std :: endl>(std :: basic_ostream>&)”,引用来自:test.o中的_main Point :: Point(double,double)在test.o中Point :: Point (Point const&)在test.o“std :: basic_ostream>”中 &std :: operator <<>(std :: basic_ostream>&,char const)“,引用自:test.o中的_main Point :: Point(double,double)in test.o Point :: Point(Point const&)在test.o“std :: basic_ostream>&std :: operator <<,std :: allocator>(std :: basic_ostream>&,std :: basic_string,std :: allocator> const&)”中,引用来自:_main in test.o ld:找不到体系结构x86_64的符号clang:error:linker命令失败,退出代码1(使用-v查看调用)make:*** [pointClass]错误1

  • 链接地址: http://www.djcxy.com/p/85073.html

    上一篇: Eclipse C++ for Mac settings (<iostream> fix) and error correction

    下一篇: allocate more than 1 GB memory on 32 bit XP