943,692 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 6971
  • C++ RSS
Mar 3rd, 2009
0

CodeBlocks

Expand Post »
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:
C++ Syntax (Toggle Plain Text)
  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
Similar Threads
Reputation Points: 11
Solved Threads: 11
Junior Poster in Training
Alibeg is offline Offline
81 posts
since Aug 2008
Mar 3rd, 2009
1

Re: CodeBlocks

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.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Mar 4th, 2009
0

Re: CodeBlocks

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
Reputation Points: 11
Solved Threads: 11
Junior Poster in Training
Alibeg is offline Offline
81 posts
since Aug 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Animation problems win 32
Next Thread in C++ Forum Timeline: CreateThread return value





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC