InstantFPC

From Free Pascal wiki
Revision as of 20:20, 25 March 2011 by Mattias2 (talk | contribs) (New page: =Overview= This tool allows to run pascal program like scripts under unix like OS (Linux, BSD, OS X). For example: <Delphi> #!/usr/bin/env instantfpc begin writeln('Hello fpc user'); e...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Overview

This tool allows to run pascal program like scripts under unix like OS (Linux, BSD, OS X). For example:

<Delphi>

  1. !/usr/bin/env instantfpc

begin

 writeln('Hello fpc user');

end. </Delphi>

Save the file as hello.pas, set the permission to execute and run it:

[]$ chmod a+x hello.pas
[]$ ./hello.pas
Hello fpc user

Download

From svn

svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/applications/instantfpc instantfpc

Installation

  1. Compile the instantfpc.lpi with Lazarus or lazbuild. Or compile directly with fpc instantfpc.lpr.
  2. Put the executable into PATH, for example /usr/bin:
sudo cp instantfpc /usr/bin/