How to install Lazarus, the most recent version of the Delphi integrated development environment (IDE) for Linux. Lazarus is free source and cross-platform, which means that it can run on Windows, Linux, and Mac. The computer program known as Lazarus Delphi is used to develop apps that may be run on a computer. How to install it on MX Linux is going to be covered in detail in this article, which we will read in its entirety.
What exactly is Lazarus?
Lazarus is an open-source, cross-platform IDE for Delphi programming on Linux that uses the Free Pascal compiler for rapid application development (RAD). Its purpose is to give Object Pascal programmers with a programming environment that is as similar to Delphi as possible and straightforward to use.
Numerous application developers on Linux or Delphi programmers on Linux use Lazarus to create applications with a graphical user interface (GUI) for desktop users, mobile devices, web applications, web services, visual components, and function libraries for multiple platforms, including Mac, Linux, and Windows.
The benefits of Lazarus
Lazarus provides a visual development environment comparable to Borland Delphi for designing user interfaces. In addition to project management tools, Lazarus IDE offers:
- What You See Is What You Get (WYSIWYG) describes its nature; what you see is what you get. Why? Because the window’s layout designer is visual GUI widgets or visual components like as edit boxes, buttons, dialog boxes, menus, etc.
- Non-visual elements for sophisticated application configuration
- Components for data connectivity with MySQL, PostgreSQL, FireBird, Oracle, SQLite, Sybase, and others.
- A set of data widgets that allow developers to visualize data as visual components in the designer to facilitate development.
- Interactive code debugger
- Code completion
- Code templates
- syntax underlining
- Context-sensitive aid
- Text resource administration for globalization (internationalization)
- Automatic formatting of code
- Capability to develop bespoke parts
Freepascal is a free Pascal compiler for 32/64-bit systems. It includes a runtime library that is completely compatible with Turbo Pascal 7.0 and nearly compatible with Delphi. Linking shared libraries is possible. This package includes the command-line compiler and utility programs. The offered units include the runtime library (RTL), the free component library (FCL), and bindings for a large number of common C libraries.
The following method has been tested on Linux Mint; as it is also based on Debian, it should work on Linux Mint and Ubuntu as well. Open the MX Package Installer, select the ” Stable Repo ” tab, put “lazarus” in the search box indicated by the arrow number 2, there will be several lazarus there, thus it can be difficult to determine which one to select as indicated by the arrow number 3, see the image below.
So perplexed, which one should I select? The package in the repository is already an outdated version, and the most recent version has been released; let’s simply install the most recent version by downloading the installer file from the official website.
- Go to Lazarus website
- Choose download for Debian (can be for MX Linux, Ubuntu, and Linux Mint), choose 64bit, this is the picture:
- Next you will be directed to SourceForge, please download the 3 files provided, namely fpc-laz, fpc-src, and lazarus-project, the file names depend on the latest release. When we practice this, we use the files fpc-laz_3.2.2-210709_amd64.deb, fpc-src_3.2.2-210709_amd64.deb, and lazarus-project_2.2.0-0_amd64.deb
- Please install one by one sequentially as mentioned in number 3 by double clicking on each deb file
- When the installation is complete, the last step is to install the GDB Debugger (GNU Debugger) by opening a Terminal and typing:
sudo apt install gdb
We have tested this method using the MX Linux version 21.1 so that what we get when installing Lazarus complete with the method described is:
- Lazarus : /usr/share/lazarus/2.2.0/ [OK]
- Compiler : /usr/bin/fpc [OK]
- FPC Sources : /usr/share/fpcsrc/$(FPCVER) [OK]
- Make : File: /usr/bin/make [OK]
- Debugger : gdb [OK]
- Fppkg : File: /etc/fppkg.cfg
Lazarus Installation Error
The following are possible errors or errors during the installation of Lazarus.
Warning: wrong version in ide/version.inc: 2.0.10+dfsg-4
This error is a version definition error on the path. Please open the path /usr/lib/lazarus/2.0.10/ide/ as root. The trick is to open the File manager (Thunar) then go to the path, right click on an empty space select “Open root Thunar here”, open the version.inc file with FeatherPad or other editors. Change ‘2.0.10+dfsg-4’ to ‘2.0.10+dfsg-4+b2’ because we can see the version in the MX Package Installer image above is ‘2.0.10+dfsg-4+b2’ and save it. It should be noted that this error applies to the old version, the latest version of the method we wrote this there is no error like this during practice.
Creating Apps Using Lazarus
Well now we try to make an application on Linux using Lazarus, just run the application through the Start Menu >> Development >> Lazarus . The main window is separate, you don’t have to look for a single window mode (such as visual basic IDE, visual studio, etc.). So try these windows, namely: source editor window, object inspector, and form. You can bring it up from the View >> Object Inspector menu . The form will definitely appear when Lazarus is run. While the Code Editor can be raised by double-clicking on the form. So that the final appearance of Lazarus looks like this:
Lazarus is an IDE programming application that is used to develop applications and is capable of running on multiple platforms. It is an object-oriented programming language which is mostly used for developing applications. On this page we have successfully installed Lazarus on Linux MX 21 and most likely can because the base is the same as Ubuntu 20.04 and Linux Mint 20.03. It works.