order of constructors
Bill Gatliff
bgat@billgatliff.com
Tue Dec 2 03:28:00 GMT 2003
Guys:
Does this work?
http://gcc.gnu.org/onlinedocs/gcc-3.3.2/gcc/C---Attributes.html#C++%20Attributes
b.g.
Bill Randle wrote:
>On Mon, 2003-12-01 at 18:10, Peter Barada wrote:
>
>
>>Is there any way to control the order of static constructors so that
>>some that access other functions are done after those functions
>>intializing fucntions are done?
>>
>>I guess I'm really asking is there any way to collect together a group
>>of static constructors and then have them 'constructed' *after* some
>>initialization functions for objects/libraries that they refer to have
>>been called?
>>
>>--
>>Peter Barada
>>peter@the-baradas.com
>>
>>
>
>The way I've done that in the past is to put all the static constructors
>that are order dependent into a single file - say StaticGlobals.cc -
>then compile this file and link it in with everything else. The order
>of construction is the order in which they are listed in the file.
>(At least this was the case last time I did it.)
>
> -Bill Randle
> billr@neocat.org
>
>
>
>------
>Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
>Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
>
>
>
--
Bill Gatliff
In the dark on embedded GNU? Step into the light.
bgat@billgatliff.com
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list