Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all, I am trying to install ddd on my debian and I am getting the : c++ compiler cannot create executables error massage. The log file shows the following ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2011
    Posts
    3

    Strange installation problem (g++)


    Hi all, I am trying to install ddd on my debian and I am getting the : c++ compiler cannot create executables error massage. The log file shows the following :
    Code:
    configure:1314: checking whether we are using GNU C++
    configure:1323: g++ -E conftest.C
    configure:1342: checking whether g++ accepts -g
    configure:1530: checking whether the C++ compiler (g++) compiles a simple program
    configure:1551: g++ -o conftest    conftest.C  1>&5
    configure:1545:22: error: iostream.h: No such file or directory
    configure: In function 'int main()':
    configure:1547: error: 'cout' was not declared in this scope
    configure: failed program was:
    #line 1544 "configure"
    #include "confdefs.h"
    #include <iostream.h>
    int main() {
    cout << "hello, world!";
    ; return 0; }
    I guess this is a backwards compatibility problem… I have compiled and ran the following program:
    Code:
    #include<iostream>
    int main(){
    	std::cout << "hello world";
    	return 0;
    }
    And it runs perfectly.
    So I guess what I need is some flag I can place in CXXFLAGS so it will run programs from back in the day when include<iostream.h> was exactable. or some other solution. Any help will be appreciated.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,591
    What version of gcc/g++ are you running? You may need to install an older compiler if you can't get the CXXFLAGS set properly. FWIW, you can have multiple gcc environments installed on your system simultaneously. I usually have 3 or 4 for just such reasons, such as 2.95, 3.4, 4.1, and 4.4 or 4.5.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Oct 2011
    Posts
    3

    that did it, thanks

    that did it, thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •