no other tSytgeoBus  variable ...

Juergen Beisert a écrit :
> Nicolas,
>
> On Wednesday 11 July 2007 11:53, Nicolas TOUCHARD wrote:
>   
>>>> The most strange is when it's working with static global structure, if I
>>>> pass it to non static , it's not working !!
>>>>         
>>> ? "pass to no static"?
>>>       
>> no problem with "static T_SYTGEOBusManager tSytgeoBus;"
>> but memory problem with "T_SYTGEOBusManager tSytgeoBus;"
>>     
>
> All right, its unitialised common variable. Do you are using anywhere else in 
> your sources a variable also called "tSytgeoBus" with a different size?
>
> For global common variables the linker combines them into one variable.
>
> So:
>
> source1.c
>  [...]
>   int var;
>  [...]
>
> source2.c
>  [...]
>  char var;
>  [...]
>
> source3.c
>  [...]
>  long var;
>  [...]
>
> ...all different "var" will be combined into one variable "var" by the 
> linker. 
> Try to add the "--warn-common" parameter to your linker. This will help to 
> find such an failure.
>
> Hope it helps
>
> Juergen
>
>   


-- 

Nicolas Touchard
NKE electronics
Rue Gutenberg Z.I. de Kerandré
56700 HENNEBONT - FRANCE
Email : [EMAIL PROTECTED]
Tél. : (33) 2-97-36-10-12
Fax : (33) 2-97-36-55-17 


-- 
ptxdist mailing list
[email protected]

Reply via email to