Author Topic: FreePascal and Lazarus integration  (Read 3451 times)


  • Newbie
  • Posts: 2
FreePascal and Lazarus integration
« on: October 11, 2017, 11:05:38 am »
We are developing a scientific CAD-like applications for industrial engineering and are looking for someone with good knowledge of Delphi and FreePascal to carry out a development of IDE and scripting functionality. Among required skills is a good knowledge of FreePascal command line parameters, RTL and RTTI, to work on enabling communication between dynamic libraries compiled with FreePascal, and IDE application developed in Delphi. Flexible work hours and competitive salary are offered. For anyone interested, please contact me at the following e-mail address:

c a r l o s AT c s i p o r t u g a l . c o m

« Last Edit: October 11, 2017, 06:26:05 pm by carlos »


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7943
Re: FreePascal and Lazarus integration
« Reply #1 on: October 11, 2017, 11:16:58 am »
Freepascal is a compiler, not a scripting engine. In theory you could compile everything to DLL and load it, but that will require careful crafting of the interface between delphi and FPC (e.g. no managed types!)

Maybe you should explain "scripting engine" a bit more? A component that calls the FPC compiler? Integrating the compiler in the Delphi binary? That is probably a GPL violation.


  • Newbie
  • Posts: 2
Re: FreePascal and Lazarus integration
« Reply #2 on: October 11, 2017, 12:55:42 pm »
The idea would be not to integrate the compiler in the binary.

The FreePascal compiler would have to be installed in the user machine as a standalone app and it would be clear to the user that it would be there..

this is the way it would work in 2 different scenarios

1 - There are some processes in the main Delphi Application that will require some specific functions and procedures to be visible to the users so that they may want to change them or create new versions of those same procedures and decide for themselves witch ones they link to those predefined processes

Before executing some of those processes the user can compile the FreePAscal code ( the compile would be triggered by the main Delphi APP ), that would have to have some way to access some variables and methods from the delphi code ( as it would use it as an API along other FreePascal units)

then in the main application when the user runs a specific process, that same process will, along its path, call compiled functions and procedures compiled with Freepascal.

2 - on the other hand the user may also create simple procedures in Freepascal that can be simply called as macros to interact with the main application.

This is intended to be used inside a scientific application and freepascal along LUA and Python seemed the only possible approaches as all the other scripting engines are quite slow for these types of tasks.

for many reasons I elected FreePAscal as the preferred solution.