extern

Ian Chapman <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.user
Message-ID <[email protected]>
HI,
     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
/tmp/cciyW9nS.o: In function `SetSensitivity(unsigned short)':
/home/stan/msp430/Ovi_Stuff/main.cpp:258: undefined reference to 
`ContactThreshold'

If I junk extern it compiles and once I get there I expect a linker 
error with ContactThreshold defined in two places.

Any suggestions appreciated.  Ian.  Oh and it did compile with windows.  
Maybe I should change to straight c in place of cpp.

         Regards Ian.

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.