|

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
|