installing ddd - fatal error

1.4k Views Asked by At

So I have been trying to install DDD. I am on a Mac OS X 10.9(Mavericks) and I have the latest Xcode installed. Whenever I run my configure file the last thing I get is the following:

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.

and whenever I check the config.log file I get:

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; }

I have downloaded the gcc from sourcefourge and installed gcc-4.9 again, but I still getting the same error. Anybody knows how to fix this or what the problem maybe?

2

There are 2 best solutions below

1
On

It seems like you are compiling c++ program but you passing .c file to c++ compiler. You passing conftest.c file to c++ compiler, it has to be confest.cpp.

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

This has to be

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

And

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

For above error change your code

to #included <iostream>

instead of #include <iostream.h>

0
On

Just open you configure file in DDD directory and add the following

`<iostream>
 using namespace std;

` and that should solve this error