Best IDE for C++ programming

Asked by pepperblue on 2009-09-08

I need an IDE that can compile and execute a c++ program. I tried Anjuta, geany, Netbeans, but i could not execute a program. I cn compile it ofcourse, but when trying to execute, i windup with an error. Any solution?

Thanks..
The Yash!!!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
pepperblue
Solved:
2009-09-28
Last query:
2009-09-28
Last reply:
2009-09-23

This question was reopened

Williams Orellana (worellana) said : #1

Hi,

you can try eclipse, is a good option.

Cheers

pepperblue (ayashif) said : #2

Do i need to include or add any libraries(ie, packages) to the OS so as to execute my code?

I like vim, gcc, and make myself :P

wah?

Yes but eclipse is a good IDE too... never been able to get it to install from the source. I had a project that needed 3.5+ (Android phone development), but the repos currently don't stock it.

The one in the repo is really old you should download it from the eclipse website.
http://www.eclipse.org/
It has its own updater too so no real need for the repos version.

Hope that helps
Shane

yes.! eclipse is one of the best solution.

pepperblue (ayashif) said : #6

One more quest.. How can i compile and execute a program using teminal? what are the commands? What are the extensions? What will be the output file(like in windows .exe)? And can i run it outside the terminal like in windows after the like-.exe file is made? One into several heheh....
Thank you for all..

The Yash!!!

.exe is for windows only unless you are using mono but that doesnt work for C++.
You can compile it in terminal but it would only work on linux.
You should look here http://www.gtkmm.org/ for more info about gnome c++ bindings.
Also for kde you can look here http://techbase.kde.org/Development/Tutorials/First_program
For ubuntu I found a good one to look at http://www.ubuntugeek.com/how-to-install-c-and-c-compilers-in-ubuntu-and-testing-your-first-c-and-c-program.html
If you have any trouble try using google most info on development is very easy to find.

pepperblue (ayashif) said : #8

How can i do programs with eclipse? It is very complicated.. I am not a programmer but a student learnig computer science. Please help me..

Have a look here
http://www.eclipse.org/cdt/
I dont develop using eclipse myself I just use gedit and compile stuff in command line.

pepperblue (ayashif) said : #10

CAn you please say me where can i get a pdf or something like that filed tutorial for c++-ing in ubuntu... FOr i know the more than basics of C++ in windows that i've done in TC. I like linux and i need to do a college project in c++ and i wish i could do it in ubuntu if i know how to.. please help me..

Thank you in advance..
The Yash!!!

I gave you a load of links to tutorials if you want to access them offline just go to file and save page as to save it onto your computer. The basics are nearly the same as in windows just linux has different things for GUIs and we have some more bindings that you can use. So just look at the links above and google stuff if you are unsure.

pepperblue (ayashif) said : #12

Ok thanks...

max425 (max425) said : #13

I had this exact question a couple of weeks ago and I looked at all the available solutions. I find the best is CodeBlocks IDE. It is available here www.codeblocks.org as a deb file. You'll get the main features you want - simple interface, syntax highlighting, integrated windows, and one click build and compile. I think I installed GCC first using Synaptic. You should probably do that too. Finally, I found the gsl (gnu scientific libraries) which have high quality computational tools. My thanks to everyone who has provided these wonderful open source programs.

pepperblue (ayashif) said : #14

THanks Max425... How can i use graphics in this c++? Not this codeblocks, But the ubuntu c++. No graphics.h, i know. Any alternative? I read somewhere i can use DSL or something like that for the purpose. But i am not able to sort out how, by reading their 'how to'. HAve any idea? And i cannot use ncurses (conio.h), it shows there is nothing like that, even though i 've installed it.

pepperblue (ayashif) said : #15

Please some one help me....

It depends on what you mean by graphics. If you want hard stuff its all OpenGL http://www.opengl.org/
If you want slightly less hard its clutter http://www.clutter-project.org/
If you want regular graphical displays eg buttons in frames etc you can either use glade or the qt designer.
Glade is for GTK+ sudo apt-get install glade
Qt is for KDe sudo apt-get install libqt4-designer

pepperblue (ayashif) said : #17

I am not going to try graphcs now in ubuntu cpp as it is some what mind twisting for me.. May be later.. Let me first try all the other text based things in this.. Then i will go for the graphics-area... I found a lot of changes form win-cpp to this.. Thank you all..

Tim Terrell (timterrell10) said : #18

The Yash,

To compile c++ code from the terminal, use:

$ g++ whatever.cpp
$ ./a.out