J
jubelbrus
I need to initiate a global variable to a class before the
initialization of any other global variable.
The problem is that when I link the application with a dll, some or
all global variables in the dll is initialized before mine.
Is there a way to ensure that my global variable is initialized before
any other?
Take a simple class
class test {
}
#pragma init_seg(compiler)
test t;
According to msdn, "Objects in this group are constructed first".
That's the "compiler" group.
I'm using Microsoft Visual Studio.net 2005/VC++ on Windows XP
initialization of any other global variable.
The problem is that when I link the application with a dll, some or
all global variables in the dll is initialized before mine.
Is there a way to ensure that my global variable is initialized before
any other?
Take a simple class
class test {
}
#pragma init_seg(compiler)
test t;
According to msdn, "Objects in this group are constructed first".
That's the "compiler" group.
I'm using Microsoft Visual Studio.net 2005/VC++ on Windows XP