Compile Error

This is a discussion on Compile Error within the C++ Programming forums, part of the General Programming Boards category; When I try to compile with GCC, I am NOW getting this error: Code: C:\>gcc C:\C++\carp.cpp gcc.exe: installation problem, cannot ...

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    25

    Compile Error

    When I try to compile with GCC, I am NOW getting this error:


    Code:
    C:\>gcc C:\C++\carp.cpp
    gcc.exe: installation problem, cannot exec `cc1plus': No such file Or directory
    (ENOENT)
    
    C:\>
    and I am using THIS code:

    Code:
    #include <isotream.h>			
    
    int main()				//Most important part of the program!
    
    {
    
      int age;				//Need a variable...
    
      cout<<"Please Input your age: ";	//Asks For age
    
      cin>>age;				//The Input is put In age
    
      if(age<100)				//If the age is less than 100
    
      {
    
         cout<<"You are pretty young!";     //Just To show it works
    
      }
    
      Else if(age==100)		//I use Else just To show an example 
    
      {
    
         cout<<"You are old";		//Just To show you it works...
    
      }
    
      Else
    
      {
    
        cout<<"You are really old";	//Executed If no other statement is executed
    
      }
    
      return 0;
    
    }

    Thanks alot.
    Thanks

  2. #2
    Registered User Cela's Avatar
    Join Date
    Jan 2003
    Posts
    362
    >>gcc.exe: installation problem
    Looks like you didn't set GCC up right to me.
    *Cela*

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    25
    I've used it about 10 times today.
    Thanks

  4. #4
    Me want cookie! Monster's Avatar
    Join Date
    Dec 2001
    Posts
    680
    > #include <isotream.h>
    Should be <iostream>

    > Else
    Should be else

    > I've used it about 10 times today.
    Are you sure the gcc compiler can compile C++ code?
    Maybe you need to use g++ or egcc in stead?

  5. #5
    Registered User newbie_grg's Avatar
    Join Date
    Jul 2002
    Posts
    77

    it does.


    Are you sure the gcc compiler can compile C++ code?
    yes gcc does compile c++ code. infact gcc compiles both c++ and c codes but nowadays g++ has become standard compiler for c++ codes if i am not wrong.
    "If knowledge can create problems, it is not through ignorance that we can solve them. "
    -Isaac Asimov(1920-1992)

  6. #6
    Me want cookie! Monster's Avatar
    Join Date
    Dec 2001
    Posts
    680
    > yes gcc does compile c++ code

    Yes, it is possible, but not always configured/installed correct to do this.

  7. #7
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    If you use the GCC compiler package, than gcc is the C compiler and gpp is the C++ compiler. According to the error message, you probably have installed the C compiler only and not the C++ compiler of the GCC package.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginner Needs help in Dev-C++
    By Korrupt Lawz in forum C++ Programming
    Replies: 20
    Last Post: 09-28-2010, 01:17 AM
  2. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 09:15 PM
  3. DX - CreateDevice - D3DERR_INVALIDCALL
    By Tonto in forum Game Programming
    Replies: 3
    Last Post: 12-01-2006, 06:17 PM
  4. error: template with C linkage
    By michaels-r in forum C++ Programming
    Replies: 3
    Last Post: 05-17-2006, 08:11 AM
  5. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21