Professional open-source cross platform IDE powered by Free Pascal

Lazarus for Mac

Lazarus 3.2

  -  265.47 MB  -  Open Source

Sometimes latest versions of the software can cause issues when installed on older devices or devices running an older version of the operating system.

Software makers usually fix these issues but it can take them some time. What you can do in the meantime is to download and install an older version of Lazarus 3.2.


For those interested in downloading the most recent release of Lazarus for Mac or reading our review, simply click here.


All old versions distributed on our website are completely virus-free and available for download at no cost.


We would love to hear from you

If you have any questions or ideas that you want to share with us - head over to our Contact page and let us know. We value your feedback!

  • Lazarus 3.2 Screenshots

    The images below have been resized. Click on them to view the screenshots in full size.

    Lazarus 3.2 Screenshot 1

What's new in this version:

Compiler options:
Default unit scopes:
- Overview: Support has been added for unit scopes (aka namespaces aka dotted units) that can be supplied by command line argument using -FN<x>

Notes:
- When the compiler needs to search a unit it first searches for the unit as is (first a compiled unit, then the source), then it prepends each supplied unit scope (in the supplied order) to the unit name (separated by a .) and again searches for first for a compiled unit, then the source for each unit scope.
- The feature is compatible with the -Un option
- If unit scopes are provided they can also be left out when resolving identifiers that are part of that scope.
- More information: See also the announcement mail here

Language:
Support for interfacing with C blocks functionality:
- Overview: Support has been added for interfacing with Apple's blocks C-extension.

Notes:
- As C blocks are very similar to anonymous methods in Delphi, we use a similar syntax to declare block types (with an added cblock and either the calling convention cdecl or mwpascal to indicate the C nature). Note that the syntax to define the code executed in a block (inline, like with anonymous methods in Delphi, or in a separately defined function/method) and the functionality of a block (the ability to capture context and code to execute it at an arbitrary point in the future) are two separate things. At this time (r29594), only the code from a global function/procedure or from an Object Pascal instance/class method can be executed within the context of a block. In the future, support will be added for nested functions and later probably also for code that is defined inline, like in Delphi.
- This functionality is currently only supported by FPC on Mac OS X 10.7 (Lion) and later, and on iOS 4.0 and later. The reason it doesn't work on Mac OS X 10.6 (Snow Leopard) and earlier, is that we require functionality that was added to the blocks runtime in later versions.
- The blocks functionality can be activated on supported platforms via {$modeswitch cblocks}
- More information:

Support for Default Namespaces:
- Overview: Namespaces can be supplied to the compiler to be prefixed to units that would otherwise not be found

Description:
- Use the new -FN<x> parameter to add a default namespace <x> to the list of default namespaces. If a unit name can not be found as-is then it will be searched for using all provided default namespaces as prefix (separated by a ".") until it is found or the list of namespaces is exhausted.
- The default namespaces can also be used as prefixes for identifiers outside the uses section.

Dynamic Arrays supported by Insert():
- Overview: The Insert() intrinsic can be used to insert arrays and elements into an existing dynamic array.

Notes:
- The element to be inserted can be either of the following:
- dynamic array of the same type
- static array of the same type
- a single element of the array's element type
- The insertion index is zero based
- If the dynamic array to be modified is empty it will simply contain the new data afterwards
- If the index is larger than the current highest index of the array then the new data is appended at the end
- If the index is negative then the new data will be appended at the start of the array
- This feature is Delphi compatible with the exception of inserting static arrays which is not supported by Delphi

- Dynamic Arrays supported by Delete():
- Overview: The Delete() intrinsic can be used to remove a sub range from an existing dynamic array.
- Notes:
- The start index is zero based
- The resulting range of Index and Count will be capped at the dynamic array's boundaries (namely 0 and the highest element); this may mean that in an extreme case no element is removed as the range is outside of the array's
- This feature is Delphi compatible

- Dynamic Arrays supported by Concat():
- Overview: The Concat() intrinsic can be used to concatenate two or more dynamic arrays together.

Notes:
- The resulting array will look as if all array elements had been added manually to the new array in order
- Empty arrays don't contribute to the new array
- This feature is Delphi compatible

- Dynamic Arrays have built in + operator support:
- Overview: The + operator can be used to concatenate two or more dynamic arrays together.

Notes:
- Requires new modeswitch ArrayOperators (enabled by default in Delphi modes)
- The resulting array will look as if all array elements had been added manually to the new array in order
- Empty arrays don't contribute to the new array
- This feature is Delphi compatible

- Dynamic Array constants and variable initialization:
- Overview: Dynamic arrays constants are now possible just as well as initializing dynamic array variables during their declaration. In both cases the same syntax as for static arrays is used.
- Notes:
- Adheres to the $J switch regarding writable constants, both for the variable itself as well as its content
- Static and dynamic array constants can be nested
- Delphi compatibility:
- In Delphi modes the syntax is […] instead of (…)
- Static array constants can not be used inside dynamic array constants
- Delphi does not adhere to the $J switch for the array's contents

Dynamic Arrays constructors:
- Overview: The […] syntax can be used to initialize dynamic array variables in code or to pass them to dynamic arrays parameters.
- Notes:
- This feature is Delphi compatible

More settings supported by $Push/$Pop:
- Overview: The directives $Push and $Pop now also handle the directives $MinEnumSize, $PackSet and $PackRecords.
- Support for threadvar sections inside class and record types:
- Overview: Class and record types can now contain a class threadvar section that allows for the addition of scoped threadvar variables.

Notes:
- This feature is Delphi compatible
- Not including the class specifier is considered an error

Support for Generic Routines:
- Overview: FPC has supported the declaration of generic types and also allowed member methods to access any generic parameters their "parent" type may have for many years. Building on this, it is now possible to declare uniquely generic routines (functions, procedures, methods) either as part of structured types or globally. In the non-Delphi syntax compatibility modes they are declared with the generic keyword preceding the procedure or function keyword and specialized with the specialize keyword preceding the identifier of the generic routine when issuing a call. In mode Delphi the syntax follows that of Delphi.
- Notes:
- This feature is Delphi-compatible, with the exception that Delphi itself does not support global (aka flat or free-standing) generic functions or procedures, only generic member methods. FPC does support them in all syntax modes (including {$mode Delphi}), however.
- It's currently not possible to declare a uniquely generic method inside of an already-generic structured type. This will be changed in a future version.
- It's currently not possible to take a pointer to the specialization of a generic routine.
- In {$mode Delphi}, some particularly complex expressions involving multiple specializations are not yet possible.
- Inlining is fully supported as long as the body of the generic routine has already been parsed.
- Management operators for record types:
- Overview: It is now possible to declare "management" operators inside record types which allow their built-in initialization, finalization and copying functionality to be extended. The new operators are Initialize, Finalize, Copy and AddRef. Initialize, Finalize and AddRef take the record as a var-parameter while the Copy operator takes the source record as first parameter and the destination record as second parameter whereby that one is a var-parameter. The Initialize and Finalize operators are called when such a record enters the scope or leaves it respectively. Copy is called when a record variable is assigned to another. AddRef is called when a new reference to an existing record is required which for example is the case when by-value-parameters are passed.
- Example: See the management operators wiki page for several code examples, as well as for more in-depth information on the feature.
- Method RTTI for interfaces:
- Overview: Is the $M directive enabled when parsing an interface detailed RTTI for each method contained in the interface is generated. This information is detailed enough to not only enumerate the parameter declaration, but also to call interface functions with the help of the Rtti.Invoke() function.

Notes:
- The idea of the feature is Delphi compatible, however the RTTI binary data is not.
- It's recommended to either use the records provided by unit TypInfo or the types provided by unit Rtti for access to avoid any problems with parsing the data.
- The generation of method RTTI data is currently restricted to COM-interfaces.

- Support for helper types extending interface types:
- Overview: A type helper can now also extend interface types. The implementations are not provided by the interface implementer, but by the helper itself.
- Notes: This allows to add functionality to an interface that does not depend on the implementer, but merely on the interface.
- Support for "IsManagedType" intrinsic:
- Overview: An IsManagedType intrinsic has been added to check whether a provided type or variable/field is a managed type (currently AnsiString, UnicodeString, COM interface, dynamic array and record with management operators).
- Notes: This function returns a constant Boolean value and is Delphi compatible.

Examples:
- Support for PE/COFF metadata directives:
- Overview: The directives SetPEOSVersion, SetPESubSysVersion and SetPEUserVersion can be used to set the corresponding fields of the PE/COFF header of the resulting binary. The format is <MAJOR>.<MINOR>.

Notes:
- Take care with the versions as that may lead to binaries not starting on older versions of Windows.
- This is Delphi compatible

Example:
- Support for WinAPI directive:
- Overview: The directive WinAPI can be used as a calling convention for routines to use the default calling convention off the target platform. This is equivalent to using StdCall on the Windows platforms (though StdCall only has any effect on i386) and CDecl on all other platforms.
- Notes:
- Delphi compatible
- Despite it's name it's not restricted to the Windows platform.

- Support for a distinct Boolean8 type:
- Overview: boolean8 is a Pascal-style boolean variable (can only hold only true = 1 and false = 0 values) that is always handled the same as a byte in terms of parameter passing conventions (as opposed to plain boolean, which follows the parameter passing convention for the C/C++ "bool" type).
- Notes: In practice, this currently only makes a difference for the x86-64 SYSV ABI, where bool/boolean is passed in the lower 8 bits of a register (rest of the bits are undefined), while boolean8 is zero-extended to 32 bits (like byte and other unsigned ordinal types < 32 bits).
- Units:
- rtl-generics units:
- Overview: A new package named "rtl-generics" was added.
- Notes: This package contains Delphi compatible units generics.defaults, generics.collections and others, implementing, amongst others, TDictionary<>.
- Rtti unit:
- Overview: A new unit named Rtti has been added which provides a high-level, object oriented access to the type information stored in the binary.
- Notes:
- This unit is intended to be Delphi-compatible
- This unit is currently experimental and not all features provided by the Delphi equivalent are yet available. Either types/methods are missing and thus compilation will fail or calling unsupported methods will trigger an exception.
- The Invoke() function as well as the callback functionality for TMethodImplementation is provided by a manager which is by default not set (an EInvocationError will be raised in that case). Currently an implementation using the libffi library is provided for selected platforms for which the unit ffi.manager needs to be used in the main project file, as well as a native implementation for x86_64 Windows which does not rely on the ffi.manager unit.
- ProcessUnicode unit:
- Overview: A new unit named ProcessUnicode has been added which provides an unicodestring version of TProcess. This allows unicodesupport on Windows without setting the default type to UTF-8.
- Notes:
- Both the old and the new TProcess units were reworked. Parts of the Runcommand support are now accessible in the class and parametrized with events. This makes custom versions easier.
- Registry unit:
- Overview: The TRegistry class was made to be fully Unicode capable.
- Notes:
- All public and protected methods (the public API) that used string parameters now default to use UnicodeString parameters.
- For all these methods overloads exist using String parameters (these call their UnicodeString counterparts).
- Methods using TStrings have counterparts using TUnicodeStringArray, and ReadStringList/WriteStringList let you specify if the TStrings should be treated as UTF8 encoded.
- The public API of TXMLRegistry was changed to use UnicodeString everywhere, without having String overloads. TXMLRegistry interfaces with a TXMLDocument structure internally, which uses DOMString (which in turn is an alias to WideString).
- TRegIniFile and TRegistryIniFile have been deprecated on non-Windows platforms.
- The public API of TRegIniFile has not been changed.


- CHM package:
- Overview: The Index writing of the CHM generator was completely rewritten.
- Notes: The result should now be more in line with what the MS CHM compiler does. Most notably the old binary index generation sometimes seemed to drop lemmas from the helpfile, this has been resolved, and even quite large helpfiles like AGS' only have a handful of differences with the MS generated index, mostly due to changes in order/sorting.

Text-mode IDE:
GDB/MI support:
- Overview: GDB/MI support has been added to the text mode IDE.
- Notes:
- It is enabled default, but can be disabled by building FPC with make NOGDBMI=1
- The old and deprecated libgdb.a support is still there for platforms that do not have a modern GDB port (or e.g. don't support true multitasking, like go32v2).
- When debugging a console application in Windows in GDB/MI mode, the debugged program is always run in a separate console. This is due to a limitation of the Windows GDB port.

i386-win32:
- The i386-win32 target now defaults to using SEH compatible exceptions:
- Overview: The i386-win32 target now defaults to using SEH compatible exceptions.
- Notes: This improves compatibility with MSVC++ exception handling.

x86_64-win64:
- Support for Microsoft's vectorcall calling convention:
- Overview: Under x86_64 (not i386), support for the "vectorcall" calling convention is now possible on Windows targets by specifying the vectorcall modifier.
- Notes: Utilises the XMM registers better than the default Microsoft ABI, allowing aligned arrays of Singles and Doubles to be passed in a single register akin to the System V ABI as used by Linux and other OS's. Also allows projects to interface with external libraries that use the convention. "vectorcall" is silently ignored if the target is not x86_64-win64.

New compiler targets:
Support for the AArch64 target:
- Overview: Support has been added for the AArch64 architecture, with Darwin iOS (but not Darwin macOS), Linux, and Android as available operating system targets.
- Notes: Apple's A7 CPU (and potentially other AArch64 CPUs too) does not support raising a signal when a floating point exception occurs.


Support for the Linux/ppc64le target:
- Overview: Support has been added for the Linux/ppc64le target. This is a PowerPC64 little endian platform that uses a new ABI termed ELFv2.
- Notes: It is not easy to build this target on a big endian Linux/ppc64 target, due to the fact that the build system does not yet contain support to deal with different ABIs/endianess.
- More information: To cross-compile a ppc64le compiler, use CROSSOPT="-Cb- -Caelfv2". Those options don't have to be specified when compiling on a ppc64le system using a native ppcppc64, as they will be set by default for that compiler.

Support for the Android/x86_64 target:
- Overview: Support has been added for the Android/x86_64 target
- More information: Android

Support for the i8086-win16 (16-bit Windows) target:
- Overview: Experimental support has been added for the 16-bit Windows target. It is a cross compiler only target (cross compilation is possible from e.g. Win32, Win64 or Linux).
- Notes: Windows 3.0 or later is supported.
- More information: Win16