Interesting, thanks for the link. I just wrapped the setup calls from within the library, but that looks like a nicer solution.

Thanks,

Evan

On Sun, Sep 19, 2010 at 9:44 PM, Alex Queiroz <asandroq@gmail.com> wrote:
Hallo,

On Sun, Sep 19, 2010 at 11:38 PM, Evan Hanson <vnhnsn@gmail.com> wrote:
> Yes, I have produced working executables that way. I was hoping there might
> be a way to produce a library that exports the defined functions without
> requiring the setup calls. I take it this isn't possible, or I'm using the
> wrong approach to achieve what I want...
>

   You may use GCC's "constructor" and "destructor" function attributes:

http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

In Windows the setup would be done in DllMain().

--