Wednesday, January 04, 2006

FPC 2.0.2 and postgresql3dyn

The Win32 binary installation of FPC 2.0.2 does not have the postgresql3dyn unit. This unit is not needed in order to compile Lazarus itself, but it IS needed by sqldb. Once Lazarus needs the FPC sources for some features, and most people have them, it's easy to solve this problem.

Considering the FPC binaries AND sources are in C:\FPC\2.0.2:

1. mkdir C:\FPC\2.0.2\units\i386-win32\postgres
2. cd C:\FPC\2.0.2\packages\base\postgres
3. make
4. copy units\i386-win32\* C:\FPC\2.0.2\units\i386-win32\postgres

Thanks giantm from #lazarus-ide channel for the help. If the step 3 does not work, probably the Delphi's make is being called instead of GNU's - if Delphi was installed BEFORE Lazarus, its bin directory is in Windows PATH environment variable. To solve it, I renamed make.exe from Delphi to make_delphi.exe; other way to do the same is using:

3. C:\FPC\2.0.2\bin\i386-win32\make.exe

As usual, YMMV.

1 comment:

Anonymous said...

An updated fpc 2.0.2 installer is available at Lazarus SF download area. It is essentially the same as the one released by the fpc team, except it does contain the missing units.