I'm revisiting some stuff I wrote a few years ago which puts a form and associated code in a dynamically-linkable library (.so) which can be reloaded on receipt of a HUP signal or if the library has been recompiled (date in the filename). My experience is that my implementation is pretty robust, and I'm reusing it to support a handheld 'scope (
https://jyetech.com/dso-coral-112a-oscilloscope/) and possibly for some older stuff with the intention of publishing it somewhere.
I'm confident in my handling of "magic numbers" describing the API presented by both the library and main program, and have a workable way that the library can be compiled statically for debugging without significant code changes. However noting the Dire Warning "it may be that the arguments or return values differ if the library is compiled in 2 different modes"
https://www.freepascal.org/docs-html/prog/progse55.html I have to ask:
Is there an easy way to generate a numeric value encoding the compilation mode used for a particular unit, together with any relevant overrides (cdecl etc.)?
MarkMLl