Paul Pluzhnikov wrote:
> "Paulo Matos" <[EMAIL PROTECTED]> writes:
>
> > Problem is that sometimes (I know this is not
> > usual in current software but I really need this) I need to pack all
> > the software and plugins into one big piece of code so I link every
> > plugin statically to the core.
>
> This should work just fine.
> You still have your global objects, and their constructors should
> still be firing at process startup.
>
I have singleton and everything should work fine but it is not:
extern "C" {
esatEnumerator *create() {
return new esatEnumeratorCR();
}
void destroy(esatEnumerator *e) {
delete e;
}
class proxy {
public:
proxy() {
esatModuleDispatcher::Instance()->registerEnumerator(create,
destroy);
}
};
proxy p;
}
This should be working but it is not. esatModuleDispatcher::Instance()
returns the singleton instance. Even if I add a exit(EXIT_FAILURE);
before the call nothing happens. Execution is not hitting proxy
constructor.
_______________________________________________
help-gplusplus mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gplusplus