2014-01-29 127 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