J
jubelbrus
Is it possible to initialize a global variable before any other global
variables is initialized.
Currently I have a binary thats linked with some dlls and by reading a
lot on the internet I've come up with this:
#pragma init_seg(compiler)
class init_before_other_globals {
}my_object;
This works fine if I have just a binary that is not linked with dlls.
my_object is initialized before anything else and everything works.
The problem is when I link this binary with some dlls. All or some of
the globals in the dll is initialized before mine. Is there any way to
prevent this from happening. I need my class to be initialized first.
Thanks for any replies
variables is initialized.
Currently I have a binary thats linked with some dlls and by reading a
lot on the internet I've come up with this:
#pragma init_seg(compiler)
class init_before_other_globals {
}my_object;
This works fine if I have just a binary that is not linked with dlls.
my_object is initialized before anything else and everything works.
The problem is when I link this binary with some dlls. All or some of
the globals in the dll is initialized before mine. Is there any way to
prevent this from happening. I need my class to be initialized first.
Thanks for any replies