[Lazarus] sharing units between lazarus and delphi

Sven Barth pascaldragon at googlemail.com
Mon Apr 1 14:30:58 CEST 2019


Andrea Mauri via lazarus <lazarus at lists.lazarus-ide.org> schrieb am Mo., 1.
Apr. 2019, 13:08:

> What should be the preferable way to make my units compilable both by
> fpc/Lazarus and Delphi?
> Is it better to use MODE DELPHI or is it better to introduce IFDEFs all
> along the code? (e.g. for different usage of @ between fpc and delphi).
> What are the pros and cons of the two strategies?
> Code compiled using MODEL DELPHI is comparable, e.g. in terms of
> performance, to code compiled using OBJFPC?
>

One of the main purposes of the Delphi mode *is* to be able to easily share
code between FPC and Delphi. So yes, that is the recommended way. Also I'm
not aware of any features that would have a difference in performance in
those two modes.

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190401/ca077b87/attachment.html>


More information about the lazarus mailing list