Girish Mahajan (Editor)

Lazarus (IDE)

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Development status
  
Active

Written in
  
Object Pascal

Lazarus (IDE)

Developer(s)
  
Volunteers (Lazarus Team)

Stable release
  
1.6.4 / February 26, 2017; 12 days ago (2017-02-26)

Repository
  
sourceforge.net/p/lazarus/code/HEAD/tree/

Operating system
  
Cross-platform, including Linux, macOS, Microsoft Windows, FreeBSD, Solaris

Lazarus is a free cross-platform visual integrated development environment (IDE) for rapid application development (RAD) using the Free Pascal compiler, which supports dialects of Object Pascal, to varying degrees. Software developers use Lazarus to create native-code console and graphical user interface (GUI) applications for the desktop, and also for mobile devices, web applications, web services, visual components and function libraries (.so, .dll, etc., for use by other programs). The Free Pascal compiler supports a number of different platforms, such as Mac, Linux and Windows.

Contents

Lazarus inherits three features from its use of the Free Pascal compiler: compile speed, execution speed, and cross-compilation. The Free Pascal compiler benefits from the Pascal language structure and the steady advancements of the Pascal compiler design (spanning several decades) to compile large applications quickly, often in a matter of seconds. When compiling reference programs for performance metrics, Lazarus produces programs that exhibit near or similar performance when compared with the same programs written in C.

An application that developers create using Lazarus on one platform can potentially compile and execute on any platform for which a Free Pascal compiler exists. The usual caveats of the limitations of the target platform apply; however, for desktop applications a single source can target Mac, Linux, and Windows, usually with no modification (or very little modification). An example application is the Lazarus IDE which itself was created using the Lazarus IDE from a single code base and is available on all major platforms and also runs on the Raspberry PI.

Features

Most similar to earlier versions of the Borland Delphi, Lazarus provides a highly visual development environment for the creation of rich user interfaces, application logic, and other supporting code artifacts. Along with the customary project management features, the Lazarus IDE also provides features that includes but are not limited to:

  • A What You See Is What You Get (WYSIWYG) visual windows layout designer
  • An extensive set of GUI widgets or visual components such as edit boxes, buttons, dialogs, menus, etc.
  • An extensive set of non-visual components for common behaviors such as persistence of application settings
  • A set of data-connectivity components for MySQL, PostgreSQL, FireBird, Oracle, SQLite, Sybase, and others
  • Data-aware widget set that allows the developer to see data in visual components in the designer to assist with development
  • Interactive code debugger
  • Code completion
  • Code templates
  • Syntax highlighting
  • Context-sensitive help
  • Text resource manager for internationalisation (internationalization)
  • Automatic code formatting
  • The ability to create custom components
  • Cross-platform development

    Lazarus uses Free Pascal as its back-end compiler. Therefore, Lazarus can, theoretically, be used to develop applications for all platforms supported by Free Pascal.

    Similar to Free Pascal’s run-time library, Lazarus provides a cross-platform application framework called the Lazarus Component Library (LCL), which provides a single, unified interface for programmers, with different platform-specific implementations. Using LCL, one can create applications in a write once, compile anywhere manner, unless system-dependent features are used explicitly.

    Cross-compiling

    As Free Pascal supports cross-compiling, Lazarus applications can be cross-compiled from Windows to Linux and FreeBSD, and vice versa. Compiling from macOS to Windows, Linux and FreeBSD is possible. Cross-compiling to macOS could be done for older (PowerPC) versions, but not for newer Intel versions, since Apple no longer releases the assembler and linker sources.

    Applications for embedded devices (smartphones, PDAs, routers, game consoles) are cross-compiled from a *nix or Windows.

    With Lazarus 1.3 (development version) it is possible to generate Android applications.

    Lazarus Component Library

    The standard application framework, Lazarus Component Library (LCL) was modeled after the Visual Component Library (VCL) in Delphi 6, and, unlike Delphi, is not restricted to Microsoft Windows operating systems. This is done by separating the definition of common widget classes and their widgetset-specific implementation. Eor each widget set is supported by providing an interface which interacts directly with the set.

    Database development

    Developers can install packages that allow Lazarus to support several database management systems (DBMSes). Programs can interact with DBMSes through code or by components dropped on a form. The data-aware components represent fields and are connected by the correct setting of properties to a TDataSource, which represents a table, and to the database components, which may be TPSQLDatabase, TSQLiteDataSet, or equivalent.

    The following DBMSes are supported out of the box using the built-in database components:

  • dBase and FoxPro can be supported without the need for an external server or library through the TDbf component
  • InterBase / Firebird. See [1]
  • Microsoft SQL Server and Sybase ASE. See [2]
  • MySQL. See [3]
  • ODBC databases. See [4]
  • Oracle. See [5]
  • PostgreSQL. See [6]
  • SQLite. See [7]
  • Differences from Delphi

    While resembling Delphi in many ways, there are a few limitations regarding the performance and feature set.

  • Under Windows the default size of an executable file is larger than the Delphi 6 or Delphi 7 equivalent as Lazarus stores debug information within the executable rather than as separate files. From release 0.9.30 Lazarus supports external debug symbols; program file size can be significantly reduced by using an external symbols file (it can be set in Compiler options), or by using Strip
  • Components for Delphi can be installed in Lazarus, but they must be converted, which can be complex (less complex since FP 2.4.x-based 0.9.30)
  • Missing important media libraries and widgets:
  • Microsoft Office connectivity (popping up Excel with a simple table filled out works in 2.5.x trunk)
  • Datasnap (not a publicly documented system, Embarcadero proprietary enterprise functionality)
  • Networking is mostly available
  • No support to directly call .NET libraries;. It is possible to call Object Pascal code from .NET software.
  • COM support was missing until version 2.2.0.
  • Missing dynamically loadable packages support.
  • Not 100 percent compatible with VCL. As mentioned previously this is by design, although the current LCL widget set should suffice for most applications. But this makes the deep repository of available VCL widgets inaccessible without conversion. The conversion effort mostly involves some editing, although there are a few fundamental differences. When porting, missing units in the libraries and COM support are a considerably bigger problem than incompatibilities between LCL and VCL.
  • Distribution and licensing

    Like Free Pascal, Lazarus is free software. Different portions are distributed under different free software licenses, including GPL, LGPL, MPL, and a modified version of LGPL.

    Specifically, the LCL, which is statically built into the produced executables, is licensed under a modified version of the LGPL, granting extra permissions to allow it to be statically built into the produced software, including proprietary ones.

    Note that installing a design-time package is equivalent to linking to the IDE. Thus, distributing the Lazarus IDE with a GPL-incompatible design-time package (e.g. the JEDI packages, which are licensed under the Mozilla Public License) pre-installed would cause a license violation. This does not prohibit proprietary packages from being developed with Lazarus, though.

    Lazarus is officially distributed via Sourceforge.

    History

    The first attempt to develop a visual IDE for Free Pascal dates back to 1998, when the Megido project commenced. For various reasons this approach failed. Some of Megido's developers then started a new project based on a more flexible foundation. The first preliminary LCL version was ready for release in 2001, and in 2003 the first beta version of Lazarus (0.9.0.3) was hosted at SourceForge. The first final Lazarus version (1.0) was released in 2012, and significantly enhanced Lazarus 1.2 with was released in 2014. More than four million downloads had been made from SourceForge as of March 2014.

    The name "Lazarus" alludes to the revival of the Megido concept. It is inspired by Lazarus of Bethany, who, according to the Gospel of John, was restored to life by Jesus four days after his death.

    Applications produced with Lazarus

  • ASuite is a free open source application launcher for Windows. From 2.0 Alpha 2, it's fully written in Lazarus/FPC.
  • AksiIDE is a Free Light IDE/Editor for PHP Developer.
  • Beyond Compare is a data comparison utility for Windows, macOS, and Linux. The macOS and Linux versions are compiled using Lazarus/FPC.
  • Cartes du Ciel is a free planetarium program for Linux, macOS and Windows. The software maps out and labels most of the constellations, planets, and objects you can see with a telescope. It is fully written in Lazarus/FPC and released under GPL.
  • Cheat Engine is an open source memory scanner/hex editor/debugger. It is useful for cheating in computer games. Since version 6.0 it is compiled with Lazarus/FPC.
  • Greenfish Icon Editor Pro is a freeware icon, cursor and animation editor.
  • EPANET, a software package for modelling water distribution systems.
  • MyNotex is a free software for Gnu/Linux useful to take and to manage textual notes.
  • Peazip is an open source archiver, made with Lazarus/FPC.
  • TorChat is moving away from Python, and is being rewritten in Lazarus + Free Pascal.
  • Total Commander 64-bit version.
  • Double Commander is a cross platform open source file manager with two panels side by side. It is inspired by Total Commander and features some new ideas.
  • Xoctave is a cross platform Graphical User Interface for GNU Octave.
  • Star Manager is a system manager that allows adjusting backlight brightness and sound volume of an ARM processor-based WinCE device, to set wallpapers on the desktop, to control and manage system processes and memory load, to control battery charge and see device configuration.
  • OmniMix is a privacy and anonymity tool, which, as a portable NNTP/SMTP/POP3 proxy server, provides a gateway to anonymous remailers including a Tor subsystem. To support code review it offers an additional setup program configured to build the Lazarus IDE and the application itself from their sources.
  • Libraries compatible with Lazarus

  • GLScene is a free OpenGL-based library that provides visual components and objects allowing description and rendering of 3D scenes.
  • OpenWire is an Open Source library that allows pin type properties to make connections between LCL components similar to LabVIEW or Agilent VEE.
  • References

    Lazarus (IDE) Wikipedia