- Free Pascal (aka FPK Pascal) is a 32 and 64 bit professional Pascal compiler. It is available for different processors: Intel x86, Amd64/x86 64, PowerPC, Sparc. Mac OS X 10.0/10.1/10.2/10.3/10.
- Free Pascal is a professional 32 and 64-bit Pascal compiler. Free Pascal Team. Pascal compiler that integrates with Xcode. For OS X 10.4 or later. Mac users with machines running PPC (10.2.8 or later) should download this version of Free Pascal 2.2.
This version The latest release version is 3.2.0
On this web page, you find version 3.4.6 u2 of the GNU Pascal Compiler (GPC) for Mac OS X. Latest news - the compiler release is compatible with Mac OS X 10.6. Click to download. GNU Pascal 3.4.6u2 installer for Mac OS X 10.4 PowerPC native and Intel cross-compiler (14.8 MB). GNU Pascal 3.4.6u2 installer for Mac OS X 10.4 Intel native and PowerPC cross-compiler (15.0 MB).
'Unknown developer' error when installing (Mac OS X 10.7 and later)
If you get the message that the FPC installer was created by an unknown developer and cannot be opened, right-click (or ctrl-click) on the installation package and choose 'Open' in the contextual menu. If this does not work, you may first have to go to 'System Preferences' -> 'Security & Privacy' -> 'General', and 'Allow apps downloaded from: Mac App Store and Identified developers'. These workarounds are required because we do not pay Apple 99 euro per year, which would prove you can trust us.Xcode 11+ compatibility (macOS 10.15 Catalina and later)
FPC 3.2.0 is qualified for use with Mac OS X 10.4 till macOS 10.15. Xcode 11+ no longer includes support for compiling Intel 32 bit programs. If you wish to compile such programs, you will have to copy an older Mac OS X SDK from a previous Xcode installation and point the compiler to it with the -XR command line parameter.Mac Os X Download
Xcode 10+ compatibility (macOS 10.14 Mojave and later)
FPC 3.2.0 is qualified for use with Mac OS X 10.4 till macOS 10.15. Xcode 10+ installs some command line file in different locations compared to previous releases. If you already installed FPC under a previous Mac OS X/OS X/macOS version, you will have to reinstall FPC 3.2.0 under macOS 10.14 to get a configuration file that enables the compiler to find the necessary files). See also the section below on how to install the command line tools.Xcode 5+ compatibility (OS X 10.9 and later; for OS X 10.8, see below)
FPC 3.2.0 is qualified for use with Mac OS X 10.4 till macOS 10.15. Xcode 5 and later however no longer install the command line tools by default, which are required by FPC. To install them manually, open '/Applications/Utilities/Terminal', execute xcode-select --install and choose 'Install'. Afterwards, FPC will function correctly.Xcode 4.3-5.x compatibility (Mac OS X 10.7/OS X 10.8)
FPC 3.2.0 is qualified for use with Mac OS X 10.4 till macOS 10.15. Xcode 4.3 and later however no longer install the command line tools by default, which are required by FPC. To install them manually, open Xcode, go to Preferences, select 'Downloads;' and install the 'Command Line Tools'. Afterwards, FPC will install and function correctly.Xcode 3.2.x-4.2 compatibility (Mac OS X 10.6)
FPC 3.2.0 is qualified for use with Mac OS X 10.4 till macOS 10.15. There is however an issue when compiling dynamic libraries with FPC under Mac OS X 10.6 due to a bug in the Xcode 3.2.x linker. This bug has been fixed in Xcode 4. You can work around the bug in Xcode 3.2.x by using the -k-no_order_inits command line parameter when compiling a dynamic library.Download the 3.2.0 release in 1 big file:
- fpc-3.2.0.intel-macosx.dmg (162 MB)contains an installation package for compiling Intel (32 bit and 64 bit) programs (updated to install successfully on macOS 10.14 'Mojave').
- fpc-3.2.0.intel-macosx.cross.powerpc-macosx.dmg (125 MB)contains an add-on installation package for compiling PowerPC (32 and 64 bit) programs.
- fpc-3.2.0.intel-macosx.cross.ios.dmg (178 MB)contains an installation package for compiling iPhone/iPod Touch/iPad programs. For Xcode templates, see Phil Hess' site.
- fpc-3.0.5.intel-macosx.cross.ios.dmg (66 MB)contains an installation package for compiling iPhone/iPod Touch/iPad programs. For Xcode templates, see Phil Hess' site.
- fpc-3.2.0.intel-macosx.cross.jvm.dmg (12 MB)contains an add-on installation package for compiling JVM programs.
Back to mirror list
Back to general download page
Welcome to the FreePascal on the Macintosh page. Here is informationespecially for you who want to write a program for the Macintosh.
News:
2005-12-18:Version 2.0.2 that was released a few weeks ago has all fixes and improvements of the 2.1.1 snapshot that was here (like Mac Pascal style objects and creationof dynamic libraries). Additionally, it doesn't suffer from the installationproblems the 2.1.1 snapshot installer had. Get the release here.
2005-07-23:
The 2.1.1 snapshot that was here is no longer available.
If you really need to be up to date with FPC,please consider using Subversion, and build the compiler by your self.
Some changes:
- No more '_main' symbol in the system unit (so can link with C main programs)
- Shared library creation support under Mac OS X
- Several bugfixes related to overflow checking on PPC
There is now awiki page covering porting issues, from traditional macpascals to FPC.
2005-06-21:
A FPC 2.1.1 snapshot is availablehere(10.8 MB, does not include the PDF documentation). It includes:
- Support for Macintosh Object Pascal in Macpas mode (includes support for mixing in Delphi-style OOP programming in Macpas mode, except that you have to use 'object' instead of 'class' everywhere -- all occurrences of 'class' are simply internally replaced by the OBJECT compiler token)
- Fixed bug which caused stack corruption in procedures receiving floating point parameters and parameters on the stack (only if the caller side was compiled by FPC)
- Fixed bug in overflow checking of integer operations (some calculations were buggy if overflow checking is turned on, which is the case in the default development building style of Xcode if you use the integration kit)
- Fixed bug in division of unsigned numbers > $7fffffff by a power of 2
2005-05-15:
At last !!!!! Free Pascal 2.0 is released for Mac OS X and classic Mac OS,as well as for other targets.
This means Free Pascal for the mac is not considered beta anymore.Get it on one of the mirror download sites.
Targets on the Macintosh:
Target / Processor | Status | Remark | Contact |
---|---|---|---|
final | For Mac OS X | ||
final | Target MacOS means classic Mac OS, up to System 9.x.Although it of course also work in the classicenvironment in Mac OS X | ||
MacOS on M68K | not planned | If someone is interrested to contribute, there is apossiblity to implement this target. There is support forMC68000 in the FPC source code, although not updated for a while. |
Mac Pascal dialect
The dialect of Pascal supported by popular Pascals on Macintosh is supported in part.Read more here.Free Pascal 2.0 for Mac OS X is the current release. It should at least work on Mac OS X 10.1 and higher. It requires that you have installedXCode from Apple, to have assembler, linker and make tools available to fpc.For older versions of Mac OS X you should install Apple Development Tools instead.Both can be downloaded for free from Apple, but requires that youregister yourself as a member of Apple Developer Connection.Both are also included in the Mac OS X bundle.
To download, go to the Download page,and choose a mirror site near you (to limit net traffic).The documentation is included, but can also be downloaded separatelly. If you want the source code, it has to be downloaded separatelly.
There most recent FPC 2.1.1 snapshot is availablehere (10.4 MB)with, among others, support for mac style object pascal. See above under NEWS.Note that the compiler is a unix style program and is run from theTerminal on MacOS X.
Please report any bugs encountered.
Using FPC from XCode
Turbo Pascal For Mac Os X
It is possible to use Free Pascal from within XCode (Mac OS X 10.3 is required).Look at the step-by-step instruction of how to download and install theXCode Integration Kit.Thanks to Rolf Jansen for this contribution.Free Pascal 2.0 for Mac OS is the current release. It will work on latest classic Mac OS (that is 9.2.2) and below, probably down to 7.1.2 (the firstMac OS for PowerPC), and also in the classic compatibility environment on Mac OS X.However it has only been tested on Mac OS 9 and Mac OS X classic environment.
It requires that you have installed Macinstosh Programmers Workshop (MPW)which can be downloaded for free from Apple.
To download, go to the Download page,and choose a mirror site near you (to limit net traffic).The documentation, as well as the source code (if you need it), has to be downloaded separatelly.
Note that the compiler is an MPW tool.
Please report any bugs encountered.
Current status of classic Mac OS
Native FPC compiler (as an MPW tool) | Almost complete | |
Unit System.pp | Complete | The system unit is implicitly used by every program. Contains basic file andmemory handling among others. |
Unit Dos.pp | Complete | Contrary to what its name suggests, the DOS unit is crossplattfrom and contains utility routines for file and datehandling, beyond that in System.pp. It is reminiscent fromTurbo Pascal. |
Unit Sysutils.pp | Planned | A moderner alternative to unit DOS, compatible withDelphi. |
Unit MacOS | Complete | API to the Macintosh Toolbox |
Units strings objpas heaptrc getopts etc | Implemented. | They are target independent. |
Other units | Non-existent. Some will be implemented. | Implementation will depend on how important the unit isand if difficulties arise. |
Debugging
There is some limited possibilities to debug programs in classic MacOS. SeeMPW debuggingin the wiki.
As an alternative, you might do the main debugging in a MacOSX/Darwinversion of your program.
There are three major Pascal dialects: Turbo Pascal (extended toDelphi, supported by FreePascal, and partially by Gnu Pascal),Extended Pascal (an ISO standard, supported by Gnu Pascal, DECPascal, Prospero Pascal), and the dialect originating from Apple(commonly used in the Mac community, supported by MPW Pascal,Metrowerks Pascal and Think Pascal). We call this dialect Mac Pascaland there is a special language mode for it: MacPas.
Mode MacPas is a compatibility mode. It is probably notpossible to mimic the Mac Pascal dialect in detail. So the goal is toimplement often used constructs, if this doesn't require too mucheffort, as well as easy-to-implement constructs.
To use MacPas, add -Mmacpas to the command line or insert thecompiler directive {$MODE MACPAS} in the source code.
Note that the mac pascal dialect and mac targets are notinterrelated. It is thus possible to write a mac program with theturbo dialect and to write a Windows program with the mac dialect.
The following are supported:Mac compiler directives like $SETC, $IFC, $ELSEC, $ENDC, $J, $Z.Most of the constructs found in interface files, especiallyApples Universal Interfaces. Cycle, Leave, Otherwise. More is planned.
More updated info on the Wiki page.
By Olle Raab
For questions and suggestions, we suggest subscribing on our mailing lists , in particular FPC-pascal for questions about using Free Pascal.
Or write toolle.raab@freepascal.org
Latest modified 2005-07-28