[fpc-devel] Dynamically Loading Libraries
Sergei Gorelkin
sergei_gorelkin at mail.ru
Mon Nov 2 14:38:29 CET 2009
Vincent Snijders пишет:
>
> I don't like the looks of lines like:
> {$IFDEF S}function{$ELSE}var{$ENDIF}foobar_dosomething{$IFDEF D}:
> function{$ENDIF}(a:cint; b:cdouble): cint; extdecl;{$IFDEF S}external
> foobarlib;{$ENDIF}
>
> They are hard to read. I understand that this way makes sure that both
> static and dynamical declaration are in sync, but the loss of
> readability is too much.
>
> Maybe it is better to generate a foobar_dyn.inc based on the foobar.inc
> or generate both foobar.inc and foobar_dyn.inc from a common file format
> (maybe even the original header file).
>
I second that. If this is intended to be maintained manually, then it is not maintainable.
If the intention is to handle the updates using automated tools, then it should not matter how much
files to generate.
Sergei
More information about the fpc-devel
mailing list