Jump to content

Recommended Posts

Posted

So I have Ubuntu on a VM - I want to be able to use C++ (and if I can do this I am going fully Ubuntu at home).

 

This is probably a simple question but can anyone tell me the easiest and most user friendly way to install C++ compiler and a decent editor?

Posted

not too sure on the specifics, but we used to use nedit at uni, its a good free syntax directed editor, as for compiler gcc should do the job.

 

to get them type apt-get nedit and apt-get gcc(should work, dont have a linux box to check at hand)

 

you can then launch them from the shell prompt i.e

 

nedit foo.cpp& (the & makes it start a new process)

 

then when your done

 

gcc -o foo foo.cpp

 

obviously all the linux users on here will probably suggest different editors as world peace is far more likely than all *nix users agreeing on a editor/shell/gui/distribution/how an integer should be incremented by one.

  • Thanks 1
Posted (edited)

apt-get install build-essential

 

That'll get you enough installed to build apps.

 

Then you'll want KDevelop, Valgrind, and maybe some other bits but I'm not a coder so can't really comment, should be enough to get you started though.

Edited by kmount
Removed s from end of essential to make it correct for future indexing.
  • Thanks 1
Posted

try here:

 

Linux C++ Software Development

 

I heartily recommend Eclipse as an IDE btw.

 

I'm not a C++ programmer (PHP, Flex, Python, Java, Haskell et al) but Eclipse rocks for what I do these days wrt to web development and has tools for C++ I understand (see linky).

 

Eclipse C/C++ Development Tooling - CDT

 

Article showing how to migrate microsoft Visual Studio C++ projects to eclipse:

http://www-128.ibm.com/developerworks/library/os-ecl-vscdt/index.html?ca=dgr-eclipse-1

 

Good luck!

  • Thanks 1
Posted
apt-get install build-essentials

 

That'll get you enough installed to build apps.

 

Then you'll want KDevelop, Valgrind, and maybe some other bits but I'm not a coder so can't really comment, should be enough to get you started though.

 

build-essentials for all the tools you need, you also need this package, if you want to compile any source packages on your VM.

Posted (edited)

Can't find build-essentials - Any ideas?

 

I've made sure that no typo's are in the line

 

EDIT: Scratch that - it's build-essential - no 's' on the end.

Edited by Hightower
Posted

For info: Used kmounts way about things.

 

I didn't try anyone elses as kmounts does everything I need (I know it's not your kmount haha, but your suggested way.... You all know what I mean)

Guest monkeyx
Posted

If you wanted to be really hardcore you just try :)

 

sudo apt-get install build-essential gvim

 

Some may chose emacs over gvim, but that would probably be a mistake LOL

Posted
Some may chose emacs over gvim, but that would probably be a mistake LOL

 

gvim is cheating... do it properly with vim!

Posted (edited)
vim ftw!!!! down with emacs and it's evil followers!

 

Pah! Text editors? Real Programmers use "echo ... >> ..." and just make sure they get the code right first time.

 

Right, next religious war: which source code control system?

 

Edit: Go see XKCD for further advice.

 

--

David Hicks

Edited by dhicks
Posted
Pah! Text editors? Real Programmers use "echo ... >> ..." and just make sure they get the code right first time.

 

Right, next religious war: which source code control system?

--

David Hicks

 

SVN!

 

I believe that real programmers write programs to write their programs for them!

 

That and the use of SED to edit other users mistakes ofc.

Posted
I believe that real programmers write programs to write their programs for them!

 

What, like LISP programmers, you mean?

 

--

David Hicks

Posted
Isn't that more like writing their own programming language to program with?

 

Aw, heck, no - I figure they're past that stage by now and have got machine intelligence advanced to the point where it can at least code BASIC, it's just that they're not telling us...

 

--

David Hicks

Guest monkeyx
Posted
Been a while since I did any c/c++, but I can recommend codeblocks. Is a great IDE that runs on Linux and another well known OS ;)
  • 2 months later...
Posted

Sorry for replying late to this thread but one tool we've found essential for C/C++ development on Linux is Valgrind. It's very good at finding memory leaks, use of uninitialised memory and other fun bugs at runtime.

 

All our software is developed on Debian Stable and then ported to Windows for release when it passes Valgrind. I've not found anything similar for free on Windows so give it a look; if your program is of any significant size it can be a real lifesaver.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...