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 - Chapter 1 - by Delax

Step 1: Downloading FPC

The first thing you should do is downloading the Free Pascal Compiler. You can get it at http://www.freepascal.org. By the time of writing this tutorial, the most recent version is 1.0.10. I suggest that you download the complete DOS and Win32 package.

Step 2: Installing FPC

After the download is complete you should have a .ZIP File on your HD. Unzip it and install the compiler by following the instructions on screen. The default directory is C:\PP.

You will get a Windows Message at the end of the installation, telling you to set some PATH variables in your AUTOEXEC.BAT. These lines are:

SET PATH=C:\PP\BIN\GO32V2
SET PATH=C:\PP\BIN\WIN32

If your AUTOEXEC already has some PATH variables, just add the new ones like this:

SET PATH=C:\Windows;C:\PP\BIN\GO32V2;C:\PP\BIN\WIN32

[Note: If you downloaded the Windows/ DOS only compiler the following entry may be enough: "C:\PP\BIN"]

Now you are ready for action. Open a DOS box and test the compiler by starting the PPC386.EXE in your FPC directory (default: "C:\PP\BIN\GO32V2"). Since you called the compiler without arguments it should promt a list.

Now we try to compile something. In your PP\SOURCE\DEMO directory is a file called "HELLO.PP". Open a DOS box, change the directory to PP\SOURCE\DEMO and call "PPC386.EXE HELLO.PP".

Note that after you added the path variable to your AUTOEXEC you'll have to reboot so that these changes are recognized. So if you get a "file not found error" try rebooting your machine.

If everything went well, the compiler should have done his job. Now you should have a file called "HELLO.EXE" in the same directory as "HELLO.PP".

If you are running into problems, please read the compiler documentation. About 90% of your questions should be answered there. If nothing helps try some forum or contact me at delax@sundancerinc.de.

Back to previous page

Useful Links









Link to us