Tag: lazarus

Development using Lazarus and PostgresDAC. Installation


There are a lot of tools for PostgreSQL development. I want to propose you one more. Why Lazarus:

  • Lazarus is shipped with open-source Pascal compiler;
  • it has a high degree of Delphi compatibility;
  • availability on a variety of platforms, including Windows, Mac OS X, and Linux;
  • complete source code is available;

Installing Lazarus

Go to Lazarus at SourceForge.

Then at the Downloads Section get proper installer. I used lazarus-1.0.8-fpc-2.6.2-win32.exe and lazarus-1.0.8-fpc-2.6.2-win64.exe in my tests. These are the latest releases at the moment.

Here are the screen shots of the installation process where you can see what I had chosen:
Lazarus Installation

Path to install

Full installation

I have Lazarus installed into C:\lazarus\ and hereafter I will use this path.

Getting PostgresDAC

Now it’s time for PostgresDAC. At the moment many Laarus IDE functions require the source and warns if the source of a unit is missing. Thus we need PostgresDAC with sources version. Sources are available for licensed users in their profile.

MicroOLAP Profile

I have extracted PostgresDAC sources to C:\PostgresDAC\.

Install PostgresDAC into the IDE

In the Lazarus IDE choose open package and select dclPostgresDACL.lpk. This is the design time package. Then in the Package window choose Use → Install.
Install package

Confirmation about rebuild will appear.


Choose “Yes”. Wait for some time. After successful rebuild Lazarus will reopen itself. Tada! We got it!

PostgresDAC in the Lazarus

Now we may open some demo projects and play some time.
GridDemo for PostgresDAC in the Lazarus

PostgresDAC meets Lazarus

First of all, Lazarus is the class libraries for Free Pascal that emulate Delphi. Free Pascal is a GPL’ed compiler that runs on Linux, Win32, OS/2, 68K and more.

I knew it before and frankly speaking always thought that Lazarus is some kind of not a serious thing. However several days ago I found the first issue of Blaise Pascal Magazine in Russian with article of Zeljan about it. “You never know till you try”, I thought, and decided to give Lazarus a chance.

Since I’m a developer of PostgresDAC component suite my first thought was to use it under Lazarus. Well, I spent two days working and suddenly… Now I’m able to create “Hello world!” bagatelle. Anyway “that’s one small step for man, one giant leap for mankind”. :) I think soon we will add official support for Lazarus in PostgresDAC.

Postgresdac under Lazarus
Postgresdac under Lazarus