Programming on Linux
Linux in general is great development platform where the operating system's kernel itself is free and Open Source. So there is virtually no limit of what you want to do with your Linux computer. Kubuntu, Ubuntu and Gnome Ubuntu are all great Linux Desktop distributions with bleeding edge desktops and touch pad user interfaces. You pick your Linux distribution flavor and start working on your projects in no time. All Ubuntu variant distributions have common package names for development and application support.
Programming Language support
Ubuntu Linux by default comes with GNU Compiler Collection and you will find almost all of the software build for the system uses GNU Compiler Collection (GCC). With GCC you can program for C, C++, Objective-C, Objective-C++, Fortran, Java, Ada, Go and many other programming languages. One good thing about GCC is that it is available for many different operating systems for example Microsoft Windows, Apple Mac OS. Furthermore, GCC is supported on all major CPU architectures.
Programming in C and C++ languages
GCC will give you gcc compiler and g++ compiler for C and C++ source files respectively. Both gcc and g++ compiler support almost all existing C standards for example ANSI C, ISO C, C99 and C11.
Installation of required packages
To get minimal development environment with C and C++ compilers, install the following packages under Ubuntu distributions:
build-essential
autoconf
automake
flex
bison
libtool
gcc-multilib
g++-multilib
in the terminal:
sudo apt-get install build-essential autoconf automake flex bison libtool gcc-multilib g++-multilib
Then, install manual pages which will help you understand function definitions.
in the terminal:
sudo apt-get install manpages-dev manpages-posix
Now, you can start writing your programs in the text editor of your choice and compile your source files easily from the terminal by putting the following command:
For C program:
gcc source_file.c
For C++ program
g++ source_file.cpp
This will produce executable file named a.out in the current directory.
If you want to read manual of a function just type the following in the terminal:
man name_of_the_function
For example:
man printf
to exit from manual press q keyboard key. Use Up and Down arrow key to navigate through the manual.
If you prefer Integrated Development Environment (IDE) then check out the following IDEs. Here I put my experiences with different IDEs:
Netbeans
Build on Java, solid user interface, recommended for all kind of developments
https://netbeans.org/
Code::Blocks
Uses native user interface, simple and good for experimentation and start-up projects
http://www.codeblocks.org/
Eclipse
Build on Java, Extensible in nature
https://eclipse.org/
KDevelop
Native KDE development environment, good for C++ and QT projects
https://www.kdevelop.org/
Geany
Lightweight native IDE, good for simple projects
http://www.geany.org/
Finally, if you ask me which IDE I would prefer, I would definitely say Netbeans :)
Linux in general is great development platform where the operating system's kernel itself is free and Open Source. So there is virtually no limit of what you want to do with your Linux computer. Kubuntu, Ubuntu and Gnome Ubuntu are all great Linux Desktop distributions with bleeding edge desktops and touch pad user interfaces. You pick your Linux distribution flavor and start working on your projects in no time. All Ubuntu variant distributions have common package names for development and application support.
Programming Language support
Ubuntu Linux by default comes with GNU Compiler Collection and you will find almost all of the software build for the system uses GNU Compiler Collection (GCC). With GCC you can program for C, C++, Objective-C, Objective-C++, Fortran, Java, Ada, Go and many other programming languages. One good thing about GCC is that it is available for many different operating systems for example Microsoft Windows, Apple Mac OS. Furthermore, GCC is supported on all major CPU architectures.
Programming in C and C++ languages
GCC will give you gcc compiler and g++ compiler for C and C++ source files respectively. Both gcc and g++ compiler support almost all existing C standards for example ANSI C, ISO C, C99 and C11.
Installation of required packages
To get minimal development environment with C and C++ compilers, install the following packages under Ubuntu distributions:
build-essential
autoconf
automake
flex
bison
libtool
gcc-multilib
g++-multilib
in the terminal:
sudo apt-get install build-essential autoconf automake flex bison libtool gcc-multilib g++-multilib
Then, install manual pages which will help you understand function definitions.
in the terminal:
sudo apt-get install manpages-dev manpages-posix
Now, you can start writing your programs in the text editor of your choice and compile your source files easily from the terminal by putting the following command:
For C program:
gcc source_file.c
For C++ program
g++ source_file.cpp
This will produce executable file named a.out in the current directory.
If you want to read manual of a function just type the following in the terminal:
man name_of_the_function
For example:
man printf
to exit from manual press q keyboard key. Use Up and Down arrow key to navigate through the manual.
If you prefer Integrated Development Environment (IDE) then check out the following IDEs. Here I put my experiences with different IDEs:
Netbeans
Build on Java, solid user interface, recommended for all kind of developments
https://netbeans.org/
Code::Blocks
Uses native user interface, simple and good for experimentation and start-up projects
http://www.codeblocks.org/
Eclipse
Build on Java, Extensible in nature
https://eclipse.org/
KDevelop
Native KDE development environment, good for C++ and QT projects
https://www.kdevelop.org/
Geany
Lightweight native IDE, good for simple projects
http://www.geany.org/
Finally, if you ask me which IDE I would prefer, I would definitely say Netbeans :)
No comments:
Post a Comment