Re: [Lazarus] sharing units between lazarus and delphi
Andrea Mauri via lazarus <[hidden email]> 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.