Programming

From TheLinuxVault

(Redirected from Compiler)
Jump to: navigation, search

Contents

[edit] Programming in Linux

Linux provides a wonderful platform for programming, and has great tools and community support to help aid developers. Since Linux is an open source project, there has always been tremendous focus on providing the end user with the necessary tools needed to get them started in contributing to the Linux kernel and other open source projects. Because of the wide variety and availability of applications and libraries that open source development creates, there are numerous tools for programmers to use to create quality software for Linux systems. Mostly what a programmer needs are text editors, compilers, linkers, libraries, and integrated development environments (IDEs).

There are two types of programming. One, is compiled programming. This takes source code, written by a programmer, and translates it into a machine readable binary. C++ and Java are examples of compiled languages. The other form of programming, is scripting. This also involves source code, but it uses an interpreter to convert the code directly into instructions at run time. Perl and Bash programming are examples of this.

[edit] Text Editors

One of the most basic tools that a programmer needs is a text editor. The purpose of the text editor is to edit the source code of the software. There are many stand-alone text editors for Linux that can be used to edit source code for any programming language. Many Linux developers prefer editors that run from the command line, such as vim, emacs, pico, or nano. Others prefer GUI text editors like gedit, kedit, kate and mousepad. There are also GUI versions of the vim and emacs command line editors.

Graphical Editors

Command Line Editors

[edit] Compilers

Compilers are programs that transform human-readable source code into machine-readable executables. Which compiler a programmer uses depends on which language they are using to write their software. For example, if you are writing a program in the C programming language, you need to use a C compiler. the program gcc is the most commonly used C compiler for Linux.

[edit] Linkers

Linkers are programs that are used to link pre-compiled object files and/or pre-compiled libraries into single executable or library files. Linkers are needed when assembling complex programs that uses modules from other pieces of software. Developers can also choose to dynamically load other software modules during execution. The most commonly used linker in Linux is called ld.

[edit] Libraries

Software libraries are precompiled functions and methods that can be called by other programs to perform specific tasks or calculations. Libraries make programming easier and more productive because they allow a programmer to use code they didn't write, nor have to maintain. There are a wide variety of software libraries available to Linux developers that do everything from calculating square roots, to controlling the light emitting diodes on a Nintendo Wii remote. Since most of these libraries are open source projects, programmers can modify the libraries to fit their needs, and submit patches back to the developers so others can reap the benefits of their labor.

[edit] Integrated Development Environments

Integrated development environments (IDEs) are applications that attempt to provide a programmer with every tool they need. The most basic IDE is a text editor with an interface for compiling and running the software. More complex IDEs include features such as revision control systems, memory leak checkers, documentation browsers, source code completion, and generic project templates. Some of the more popular IDEs in the Linux world are KDevelop, Glade, MonoDevelop, Eclipse, and Anjuta. Which IDE is right for a certain project is usually dependent on what language the project is in, as well as personal taste of the developer. Because many IDEs work by simply calling other existing programs (for example, compiling a C program in KDevelop usually means calling the gcc C compiler), IDEs can be customized to work in languages that they weren't necessarily created for.

Personal tools