Interesting, thanks for the link. I just wrapped the setup calls from within the library, but that looks like a nicer solution.<br><br>Thanks,<br><br>Evan<br><br><div class="gmail_quote">On Sun, Sep 19, 2010 at 9:44 PM, Alex Queiroz <span dir="ltr"><<a href="mailto:asandroq@gmail.com">asandroq@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hallo,<br>
<div class="im"><br>
On Sun, Sep 19, 2010 at 11:38 PM, Evan Hanson <<a href="mailto:vnhnsn@gmail.com">vnhnsn@gmail.com</a>> wrote:<br>
> Yes, I have produced working executables that way. I was hoping there might<br>
> be a way to produce a library that exports the defined functions without<br>
> requiring the setup calls. I take it this isn't possible, or I'm using the<br>
> wrong approach to achieve what I want...<br>
><br>
<br>
</div>    You may use GCC's "constructor" and "destructor" function attributes:<br>
<br>
<a href="http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html" target="_blank">http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html</a><br>
<br>
In Windows the setup would be done in DllMain().<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">-alex<br>
<a href="http://www.artisancoder.com/" target="_blank">http://www.artisancoder.com/</a><br>
</div></div></blockquote></div><br>