What do I need to start programming? [closed]
I am a brand new engineering student, my teacher told us that we need to program in C++, I am new to programming and to Ubuntu, I am installing the latest version of Ubuntu but I would like to know what else do I need to program in C++, I've been told to install Kate, can you please tell me what else I need? and where to find documentation related to programming and the programs I need? than you very much!
Solution 1:
You'll need to :
- write code: a text editor of your choice (gedit by default or xemacs, vi, etc...) or an IDE (i'll recommend codeblocks or Eclipse + eclipse-cdt, etc.)
- manage your code: aka use a Version Control System, optional at first while learning but you'll benefit from knowing git or mercurial once you'll start working on non-trivial projects.
-
compile code: install
build-essential
(includes g++, make, C headers, etc., don't go for a manual install of the compiler)sudo apt-get install build-essential
-
debug it: don't think you'll ever be able to skip this step ^^
sudo apt-get install gdb
Solution 2:
You need an editor (Use one you like, gedit is preinstalled for Ubuntu, I, myself, prefer SciTE) and a c++ compiler.
The c++-compiler (g++) is found in the package g++. I would however recommend installing the package build-essential, it will install some more useful packages.
g++ can be invoked on the command-line like this: g++ source.cpp -o myprogram
Later when your programs will get more functions you will probably need some extra libraries. You can find them most easily via apt-cache search
. Library packages have the suffix -dev or the prefix lib, e.g. zlib1g-dev for the compression library.
Solution 3:
I would recommend to install eclipse if you intend to start coding in c++. It is a good IDE to familiarize yourself with as it has support for Java and Python among others to consider for the future; also it is the best supported IDE for developing android apps.
sudo apt-get install eclipse