Re: [Mspgcc-users] extern

2013-07-25 Thread DJ Delorie
Typically, you have "extern ..." in all but one source file, and just "..." in one source file where that symbol is defined. Saying "extern int foo;" means "I expect some other module to have foo." Saying "int foo;" means "I have foo." So exactly one module needs to have foo, to avoid linker er

Re: [Mspgcc-users] extern

2013-07-25 Thread Daniel Beer
On Thu, Jul 25, 2013 at 10:39:09PM -0400, Ian Chapman wrote: > I'm using - msp430-gcc (GCC) 4.6.3 20120301 (mspgcc LTS 20120406 > unpatched)- and it fails on > > extern unsigned short int ContactThreshold; > > giving this error > > msp430-gcc -Os -Wall -g -mmcu=msp430f5438a main.cpp > /tm