[Lazarus] Two versions
Santiago A.
svaa at ciberpiula.net
Mon Sep 14 16:52:31 CEST 2009
An interesting idea, but probably too hard for a student project, would
be the capability of using a C library without having to manually create
the pas file that translates the c header. That is tedious, error prone
and a mess when the .h changes and we continue to use the wrong .pas and
strange error creep in.
Also there are a lot of C libraries that are not available to fpc
because nobody had the time to create the bindings. I know that there is
h2pas but it is a off line tool and needs a lot of help from the programmer.
A better way could be to hack a C compiler (GCC ?) and use only the
parser and the first compilation stage to have the symbols related to
the available functions and structures and create the pas header from
that information. With such tool we could have almost automatic use of
any c library...
Of course, hacking an existing C compiler is not a mostly welcome
prospect for those who like fpc/Lazarus :)
Paulo Costa
More information about the Lazarus
mailing list