Programming Related Tools
Getting to know the other programming related tools
Linux installation usually comes with a C and/or C++ compiler. The C compiler is typically called cc or gcc while the C++ compiler is invoked using CC or g++. Most large C or C++ applications downloaded as a package include a makefile and allow custom configuration. Installing such utilities is as simple as running the configuration script and a make command:
[ LinuxUser ] ~$ ./configure [ LinuxUser ] ~$ make [ LinuxUser ] ~$ make install
C programs may be compiled and executed using Linux if the gcc compiler is installed. The emacs editor combined with the Linux OS provide an ideal development environment even on a CLI. Many state of the art GUI based Integrated Development Environments (IDEs) have been written for X Windows. The following C program simply prints 'hello world!' onto the standard output:
[ LinuxUser ] ~$ more hello.c
#include <stdio.h>
int main() {
printf("hello world!\n");
return 0;
}
The 'cc' command may be used to compile and link hello.c. The executable program 'hello' that results from compilation should be loaded and executed like a shell script or any other executable.
[ LinuxUser ] ~$ cc hello.c -o hello [ LinuxUser ] ~$ ./hello hello world! [ LinuxUser ] ~$
cvs (Concurrent Versioning System) is a versioning control utility used in large multi-user programming projects to control concurrent editing of source files by multiple authors. Many users of a system may be involved in the design and implementation of a software application. They probably modify the same set of files. Two users may try to edit a single file at the same time. A user may overwrite a current copy of some source code with his copy without being aware that someone else has added modules to the file in the meantime. CVS keeps old versions of files and maintains a log of when changes occurred and who authored the changes.
The cvs utility maintains a single copy of the master sources called the source "repository". Users are only allowed to modify only their own private copies of files after checking them out. Following are some useful cvs commands:
[ LinuxUser ] ~$ cvs checkout modules
The checkout command gives the issuer a private copy of source code.
[ LinuxUser ] ~$ cvs update
The update command changes a user's copy of checked out code and makes it up-to-date.
[ LinuxUser ] ~$ cvs add files
The add command adds new files that were previously not part of the repository. The repository has to be checked out before adding files. A commit directive has to be issued before changes become effective.
[ LinuxUser ] ~$ cvs remove files
The remove command deletes files from a checked out repository. Once again, a commit directive has to be issued before changes become effective.
[ LinuxUser ] ~$ cvs commit files
The commit command is a confirmation command that updates the source code in the repository with changes made to the private copies.