order of constructors

Bill Randle billr@neocat.org
Thu Apr 22 00:02:00 GMT 2004


It might. It didn't exist in the days of gcc 2.7.2 when I used the 
method I outlined.

    -Bill

Bill Gatliff wrote:

> 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
>>
>>  
>>
>


------
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