[fpc-devel] Call initialisation of library automatically in unit-initialization?
Marco van de Voort
marcov at stack.nl
Wed Dec 3 12:51:18 CET 2008
In our previous episode, Joost van der Sluis said:
> When you use the MySQL client, you have to call myslq_library_init to
> initialise the library, and mysql_library_end to de-initialize it again.
> When the library is dynamically loaded using mysqlXXdyn.pp, shall I call
> these functions automatically? Or should we leave it to the programmer?
> (I'm in favour of doing it automatically)
No real strong opinion, BUT if you don't do it, if the prototype changes,
you can work around without requiring a new version of FPC.
(e.g. a certain MS version of the dll turns out to accidentally have
> But when the library is linked in statically? Add these functions to the
> initialize and finalize sections of the unit mysqlXX.pp? Or should we
> leave these calls to the programmer? (In this case I would let the
> programmer do this)
I would too.
More information about the fpc-devel