<div dir="ltr">2016-04-13 15:52 GMT-03:00 Michael Van Canneyt <span dir="ltr"><<a href="mailto:michael@freepascal.org" target="_blank">michael@freepascal.org</a>></span>:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On Wed, 13 Apr 2016, Mazola Winstrol wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello list,<br>
<br>
I writting a cross-platform shared library (.dll, .so). I need to<br>
initialize some global variables.<br>
<br>
As the free pascal doesn't support library events (PROCESS_ATTACH,<br>
PROCESS_DETACH), what is the correct to way to do this?<br>
</blockquote>
<br></span>
It does, but it catches them in the system unit; I do not think they are<br>
exposed.<br>
<br></blockquote><div><br></div></div>So, what is the correct way to initialize global variables? In a normal program i can use unit's initialization section or class constructors. But the documentation is not clear about the the case of shared libraries.<br><br></div><div class="gmail_extra">regrds<br></div></div>