Table of Contents
Compiling programs
Compiling is the process of translating the source code into the native language of the computer's processor using a compiler.
Compiler
Depending on the language used to write the program, different compiler are necessary:
- for C program use
gcc
; - for FORTRAN program use
gfortran
.
They have to be installed through Synaptic.
Source code
The source code is usually supplied in the form of a .tar
file, also called tarball.
Building & Installing the program
Use the following commands in this order.
- Analyse the building environment:
./configure
Important: if there are error messages, the configuration will fail and the program will not be built until the errors will be corrected.
If everything is ok will be created the
Makefile
file. - Build the program:
make
- Install the program:
sudo make install
Since it will be installed in
/usr/local/bin
, which is not normally writeable, it's necessary to become the superuser.
The above procedure doesn't give the possibility to uninstall the software.
In this case, to create a .deb
file that can be handled through Synaptic, install the checkinstall
package, then run the command within the source folder:
sudo checkinstall