Why is this causing a "Data element too large" error?Which version FPC?
But same idea compiles without problems in Delphi.This code is FPC compatible, just a little {$mode delphi} and System.SysUtils -> SysUtils renaming and you're done.
The delphi code? yes! Just what you wrote.But same idea compiles without problems in Delphi.This code is FPC compatible, just a little {$mode delphi} and System.SysUtils -> SysUtils renaming and you're done.
Which version FPC?Unfortunately, not here. See attachment. What are you using? Windows or Linux? I'm using Windows 10 here.
This work in 3.0.4:
[...]
This code is FPC compatible, just a little {$mode delphi} and System.SysUtils -> SysUtils renaming and you're done.What about the Generics?
What about the Generics?
FPC doesn't like this either:
If I add "generics.collections" to the uses clause as mandated by delphi it works fine for me with 3.1.1I tried adding Generics.Collections, but FPC says it is unknown.
Which is exactly what Leledumbo explained:Yes, thats what I tried. But see above. FPC says it can't find that unit.
Note that rtl-generics is trunk. There is a 3.0.4. version available as separate download from the author.
Most fgl container types are for pointers.
So probably internally it defines a rather large type (pointer to array of T) .