AnsweredAssumed Answered

Disable automatic external object creation by linker

Question asked by Rosario Vumbaca on Nov 30, 2014
Latest reply on Dec 2, 2014 by Rosario Vumbaca

Hi,

 

I am using CW for MCU 10.6 with HCS08.

 

If I define an extern variable but it is not actually declared anywhere (or if I set it to 'static' and try to access it from a different module using an 'extern' declaration) the linker will generate the warning L1823 and will automatically create the object locally.

 

I do not want this behaviour, instead I want a linker error to be generated as expected.

 

Is it possible to disable this 'feature' in the linker? I have looked through the options and searched through these forums, but have found no solution.

 

Thanks,

 

Rosario

Outcomes