Welcome to the FreePascal on the Macintosh page. Here is information especially for you who want to write a program for the Macintosh.
On MacOSX, debug symbols are often in stand alone bundles called dSYM files. These are bundles that contain DWARF debug information and other resources related to builds and debug info. The DebugSymbols.framework framework helps locate dSYM files when given a UUID. It can locate the symbols using a variety of methods. Thank you for downloading Fable of Dwarfs for Mac from our software library The software is periodically scanned by our antivirus system. We also encourage you to check the files with your own antivirus before launching the installation. The license type of the downloaded software for Mac OS X is trialware. The dwarfs were first given names in the 1912 Broadway play, Snow White and the Seven Dwarfs. Of course, they are most well-known by the names that the Disney movie gave them. What is astonishing though is that the dwarfs have had different names in as many as eleven versions of the story.
The download statistics indicate that the snapshots below are still downloaded a lot. Note that all fixes from those snapshots are also in the official release of FPC 2.2.2 (and will be also in later versions, when they become available), which was released in August 2008. Since FPC 2.2.2 also contains many additional fixes, we recommend you to use that version. It is available from the regular download pages.
2007-11-14:There are some errors in the new linker shipped with Xcode 3.0/Mac OS X 10.5. A detailed overview was posted to the fpc-pascal mailing list. We have worked around most of those issues and created (stable) development snapshots for both PowerPC and Intel. These are intended to be installed on top of the 2.2.0 release version. Future releases will have these fixes incorporated.
One linker bug cannot be completely worked around in the compiler, which is related to the Stabs debugging format. For this reason, we recommend to switch to the Dwarf debugging format on Mac OS X 10.5. On the command line, you can do this by using -gw instead of -g to generate debugging information. In the Xcode projects, add -gw at the end of the FPC_SPECIFIC_OPTIONS project setting for the Debug configuration.
2006-08-27:Target / Processor | Status | Remark | Contact |
---|---|---|---|
final | For Mac OS X | ||
final | Target Mac OS means classic Mac OS, up to System 9.x. Although it of course also work in the classic environment in Mac OS X | ||
Mac OS on M68K | not planned | If someone is interrested to contribute, there is a possiblity to implement this target. There is support for MC68000 in the FPC source code, although not updated for a while. |
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 installed XCode 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 you register 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 available here (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 the Terminal on Mac OS X.
Please report any bugs encountered.
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 first Mac 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.
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 and memory handling among others. |
Unit Dos.pp | Complete | Contrary to what its name suggests, the DOS unit is cross plattfrom and contains utility routines for file and date handling, beyond that in System.pp. It is reminiscent from Turbo Pascal. |
Unit Sysutils.pp | Planned | A moderner alternative to unit DOS, compatible with Delphi. |
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 is and if difficulties arise. |
There is some limited possibilities to debug programs in classic Mac OS. See MPW debugging in the wiki.
As an alternative, you might do the main debugging in a Mac OS X/Darwin version of your program.
There are three major Pascal dialects: Turbo Pascal (extended to Delphi, supported by FreePascal, and partially by Gnu Pascal), Extended Pascal (an ISO standard, supported by Gnu Pascal, DEC Pascal, 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 Pascal and there is a special language mode for it: MacPas.
Mode MacPas is a compatibility mode. It is probably not possible to mimic the Mac Pascal dialect in detail. So the goal is to implement often used constructs, if this doesn't require too much effort, as well as easy-to-implement constructs.
To use MacPas, add -Mmacpas to the command line or insert the compiler directive {$MODE MACPAS} in the source code.
Note that the mac pascal dialect and mac targets are not interrelated. It is thus possible to write a mac program with the turbo 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, especially Apples 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 to olle.raab@freepascal.org
Latest modified 2005-07-28