2014-01-29 128 views
2

所以我一直在尝试安装DDD。我使用的是Mac OS X 10.9(Mavericks),我安装了最新的Xcode。每当我跑我的配置文件,我得到的最后一件事是:安装DDD - 致命错误

checking whether c++ accepts -g... yes 
checking whether the C++ compiler (c++) compiles a simple program... no 
configure: error: You must set the environment variable CXX to a working 
        C++ compiler. Also check the CXXFLAGS settings. 
        See the file 'config.log' for further diagnostics. 

,每当我检查的config.log文件,我得到:

configure:2684: c++ -o conftest -g -O2 conftest.C 1>&5 
configure:2678:10: fatal error: 'iostream.h' file not found #include <iostream.h> 
1 error generated. 
configure: failed program was: 
#line 2677 "configure" 
#include "confdefs.h" 
#include <iostream.h> 
int main() { 
cout << "hello, world!"; 
; return 0; } 

我已经下载从sourcefourge gcc和安装gcc-4.9再次,但我仍然得到相同的错误。任何人都知道如何解决这个问题或者什么问题可能?

+0

改变你的''到'' sujin

+0

这不是他的图书馆,它是DDD的。 – Sunspawn

回答

0

看起来好像你正在编译C++程序,但你传递.c文件到c++编译器。您将conftest.c文件传递给C++编译器,它必须是confest.cpp

configure:2684: c++ -o conftest -g -O2 conftest.C 1>&5

这必须是

configure:2684: c++ -o conftest -g -O2 conftest.cpp 1>&5

而且

fatal error: 'iostream.h' file not found #include <iostream.h> 1 error generated.

对于上述错误更改代码

#included <iostream>

,而不是#include <iostream.h>

+0

这些是自动生成的日志。每当我运行配置文件为了安装DDD,这就是我得到的。所以,我不知道我是否可以改变文件或文件本身的扩展名 – amenocal