OK some more testing has confirmed that neither initialization/finalization or standard

[pascal]

begin
// put code here
end.
[/pascal]

works in a shared object under linux. initialization areas are run if you compile an application but not shared objects. I realise the shared library is not recommended in the current version, but there must be a way around this.

In the old versions of pascal there were hooks like dllload and dllunload you could link into to detect when dll's were loaded, surely there must be something similar in unix based operating systems.

Anyone got any ideas :?: