|

Getting started with FPC - Part 1 - by Aiwendil
Installation of fpc
I will split this into three sections:
- Debian
- Other Linuxes
- Testing the compiler.
I. Debian
It is really easy just type "apt-get install fp-compiler" and it will install it in a usable (but not too effective for other things than debugging your own program), so if you have debian and this worked scroll down to section III :) otherwise read section II.
II. Other Linuxes
A bit harder than with Debian.
- fetch fpc-x.x.x.ELF.tar (www.freepascal.org have it)
- you can also download only the packages you need, if you have
limited discspace or a slow connections this is preferred, just
remember to get install.sh
- untar the file (tar -xvf fpc-x.x.x.ELF.tar)
- remember that this is a "rude" package, it will create no
directory for itself, so put the tarball in it's own directory
before untaring.
- type either "./install.sh" or "sh ./install.sh"
- answer to all the questions given
- if unsure the default is usually a good choice but not always.
III. Testing the compiler.
Congratulations, you do now have fpc installed, now it's time to test
it to see if it installed correctly.
uses crt;
begin
clrscr;
gotoxy(34,10);
writeln('Hello Linux!');
gotoxy(1,20);
end.
- Copy and paste the above code into a file called hello.pas
- Save the file
- Type "ppc386 hello.pas"
- this is the page where thing can go wrong, usually the errors
tells you want has gone wrong, in case of an "cannont find ppc386"
check you path and update it, or try to reinstall fpc.
- type "./hello" :)
Hope it helped
//Aiwendil
Back to previous page
|