CodeBlocks

Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Aug 2008
Posts: 80
Reputation: Alibeg is an unknown quantity at this point 
Solved Threads: 10
Alibeg Alibeg is offline Offline
Junior Poster in Training

CodeBlocks

 
0
  #1
Mar 3rd, 2009
I ve just installed ubuntu intrepid ibex (8.10.) on my laptop
i have been using it for a while already but i just wanted to clear the system completely so i installed it, put some updates, some programs, but i also installed CodeBlocks using synaptic manager. Everything finished smoothly.
Now, i started the program, typed small program just to check if everything works.
I saved it as HelloCodeBlocks.cpp
Here is the code:
  1. // HelloCodeBlocks.cpp -- First program in CodeBlocks
  2.  
  3. #include <stdio.h>
  4.  
  5. int main (void)
  6. {
  7. printf ("Hello CodeBlocks!\n");
  8.  
  9. getch ();
  10. return 0;
  11. }
but it seems it doesent work.
when i try to compile it (build it) it says this in build log:

Compiling: /home/basta/Programs/HelloCodeBlocks.cpp
/bin/sh: g++: not found
Process terminated with status 127 (0 minutes, 0 seconds)
0 errors, 0 warnings

it seems to me that it is trying to use g++ as compiler although it said that gcc is the default one (and i have it on my machine - installed it using synaptic manager)
i tried to change default "c++ compiler" from g++ to gcc and the same thing for "linker for dynamic libs" and than it says:

Compiling: /home/basta/Programs/HelloCodeBlocks.cpp
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

any suggestions? is there anything i had to configure before first run? thanks in advance
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: CodeBlocks

 
1
  #2
Mar 3rd, 2009
You have gcc (The C compiler) installed, but not g++ (The C++ compiler). cc1plus is the binary you need, but it comes bundled with g++ (not gcc). Look for build-essential, or at a prompt apt-get install build-essential. Possibly you might just do apt-get install g++, but I think build-essential has more tools.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 80
Reputation: Alibeg is an unknown quantity at this point 
Solved Threads: 10
Alibeg Alibeg is offline Offline
Junior Poster in Training

Re: CodeBlocks

 
0
  #3
Mar 4th, 2009
thank you....i first did
sudo apt-get install c++, becuse i already had newest version of gcc, but as many suggested i also did sudo atp-get install build-esential...
work perfectly...
again...thank you very much
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 1431 | Replies: 2
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC