Welcome to the new Friends-of-FPC!

Here you can find all kinds of information about the FreePascal Compiler. We have many tutorials and howtos as well as a selection of tools to help you with your programming. We also have some example codes for you. And if you want to contribute some information/ sources/ tools yourself you can do so.
Also we have finally relaunched the FoFPC forum. It's your chance for some Q&A about everything FreePascal.

Friends-of-FPC

Tutorials: Learn how to code with FreePascal.

Source Codes: A collection of examples, miscellaneous source codes and open source stuff.

Tools and Help Files: Intro- duction of some tools that might help you with FPC.

Community

Forum: Ask or answer questions about the FreePascal Compiler, programming or just babble about coding.

Contribute! Contribute your own Tutorial, Source Codes or Tools and send them to us!

Website

About: Information about Friends-of-FPC.org.

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

Useful Links









Link to us