[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Running initial code when in library
From: |
Paulo Matos |
Subject: |
Re: Running initial code when in library |
Date: |
23 May 2006 11:51:00 -0700 |
User-agent: |
G2/0.2 |
Paul Pluzhnikov wrote:
> "Paulo Matos" <pocmatos@gmail.com> 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.
- Running initial code when in library, Paulo Matos, 2006/05/23
- Re: Running initial code when in library, Paul Pluzhnikov, 2006/05/23
- Re: Running initial code when in library,
Paulo Matos <=
- Re: Running initial code when in library, Paul Pluzhnikov, 2006/05/23
- Re: Running initial code when in library, Paulo Matos, 2006/05/23
- Re: Running initial code when in library, Paul Pluzhnikov, 2006/05/23
- Re: Running initial code when in library, Paulo Matos, 2006/05/23
- Re: Running initial code when in library, Paul Pluzhnikov, 2006/05/23
- Re: Running initial code when in library, Paulo Matos, 2006/05/24
- Re: Running initial code when in library, Paul Pluzhnikov, 2006/05/24
- Re: Running initial code when in library, Paulo Matos, 2006/05/24
- Re: Running initial code when in library, Paul Pluzhnikov, 2006/05/25
- Re: Running initial code when in library, Paulo Matos, 2006/05/25