[fpc-pascal]Where is the error?

Michael.VanCanneyt at Wisa.be Michael.VanCanneyt at Wisa.be
Wed Sep 1 09:29:10 CEST 2004

On Wed, 1 Sep 2004, Marc Santhoff wrote:

> Am Di, den 31.08.2004 schrieb Michalis Kamburelis um 22:25:
> > When you compile using -S2 parameter you are compiling in objfpc mode. 
> > This mode is not exactly compatible with Delphi. In this particular 
> > case, the problem is that in objfpc mode method parameters can't have 
> > the same name as the object properties and fields (that's what 
> > "Duplicate identifier ..." errors mean). That's often very nice 
> > safety-check, however it makes many Delphi code invalid in objfpc mode.
> > 
> > Solution is to compile in delphi mode:
> >    fpc -Mdelphi mat.pas
> > works OK.
> This leads me to the question:
> Is it "legal" to link together objects compiled in different modes? (I
> haven't tried if it is possible at all ...)
> For example Alan would compile his matrix stuff in delphi mode and link
> to other object files compiled in objpas mode?

This is not a problem. The generated code is the same, independent of the
mode. The mode only affects the parsing, and how identifiers are


More information about the fpc-pascal mailing list