安装DDD-致命错误

installing ddd - fatal error

本文关键字:致命错误 DDD- 安装      更新时间:2023-10-16

,所以我一直在尝试安装DDD。我在Mac OS X 10.9(Mavericks)上,并且安装了最新的Xcode。每当我运行配置文件时,我得到的最后一件事就是以下内容:

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,但是我仍然遇到相同的错误。有人知道如何解决这个问题或可能是什么问题?

看来您正在编译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>

只需打开您在DDD目录中配置文件,然后添加以下

`<iostream>
 using namespace std;

`这应该解决此错误

相关文章: