C++ software for ubuntu

Asked by Abdul Ahad

Like we have turbo C++ in windows...

Is there any software that can be used to compile c++ program in Ubuntu 10.10....

Question information

English Edit question
Ubuntu build-essential Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
enubuntu (mr.tennents) said :
Revision history for this message
enubuntu (mr.tennents) said :

Ok for help you, do this:
1. Open a terminal by hitting CTRL + ALT + T
2. Enter this command:
sudo apt-get install build-essential

3. Open a text editor
4. Write your code and save the file with .cpp exstension
5. In the terminal, move to the folder of the .cpp file
6. Run this commands in the terminal for compile the .cpp file:
g++ -o compiled_file original_file.cpp

(compiled_file will be the executable, original_file is the file writte in the text editor)

7. Execute the program with this command:

(where compile_file is the name of the compiled file)

Revision history for this message
Saptarshi Ghosh (ghoshsaptarshi7) said :

ubuntu by default ships gcc to help you compile C/C++ programs.
Try these steps -
1. Open gedit
2. Write the code and save you program.
3. Open the terminal.
4. browse to the location you saved the file.
5. Enter this command - "gcc <name-of-file>.c" (without quotes)
6. Then, enter ./a.out
7. Your program will start start execution
NB - I've used gcc compiler if you need to use any other check the man pages

Can you help with this problem?

Provide an answer of your own, or ask Abdul Ahad for more information if necessary.

To post a message you must log in.