[fpc-devel] Dynamically Loading Libraries
ivo_steinmann at gmx.net
Mon Nov 2 22:21:24 CET 2009
Luiz Americo Pereira Camara schrieb:
> Ivo Steinmann escreveu:
>> Vincent Snijders schrieb:
>>> 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)
>> Most libraries are translated by a tool like h2pas from the original
>> headers and then rehashed manually. The best solution would be, if
>> there's a tool that generates the var procedures directly from all
>> external procedures.
> I think that creating a tool to translate a static header to a dyn
> header should be easy to create (i'm not talking to convert c header
> directly ;-)).
> Should do the following right? Correct me if i'm wrong:
> Static function:
> function foobar_dosomething(a:cint; b:cdouble): cint; extdecl;external
> Becomes a dyn function:
> var foobar_dosomething: function(a:cint; b:cdouble): cint; extdecl;
> I can write such tool.
> fpc-devel maillist - fpc-devel at lists.freepascal.org
Including the list of symbols I suggested.
More information about the fpc-devel