Page 2 of 2

Re: MOD54415 compiler error messages

Posted: Mon Dec 02, 2013 11:45 am
by tony
Try to clean and then rebuild your project. Maybe one of the object files is old.

Re: MOD54415 compiler error messages

Posted: Mon Dec 02, 2013 11:52 am
by jediengineer
Already did that. Cleans fine, but the errors show back up again on the next save/compile.

Re: MOD54415 compiler error messages

Posted: Mon Dec 02, 2013 12:38 pm
by jediengineer
Fixed it.

One of my boolean values in my funcs.cpp file was not declared as extern. Had nothing to do with the arrays, but when I fixed that, it all went away. Thanks for the insight everyone!!!

Re: MOD54415 compiler error messages

Posted: Mon Dec 02, 2013 1:04 pm
by jediengineer
I take that back - now all of a sudden the error message is back. Not sure why, but I'm back to square one.

Re: MOD54415 compiler error messages

Posted: Mon Dec 02, 2013 1:37 pm
by tod
I think I muddied the waters (as Dan was right to avoid) unnecessarily. The include guards prevent a different problem so I was just trying to forestall that problem. Please re-read the last paragraph of Dan's initial post. You are doing precisely what he suspected, follow his advice. If you don't understand it, most good C books will have a topic where they talk about Separate Compilation, probably in the section where they talk about the linker. If you don't have a good C book this page may help you with declare vs. define. Note that right at the bottom under Common Cases the last paragraph applies directly to what you are doing.

Re: MOD54415 compiler error messages

Posted: Tue Dec 03, 2013 4:18 am
by jediengineer
Thanks Tod,

That was a helpful page, and it would appear that I have erred. WORD ADC[16] and WORD MUX_POS[32] are defined in defs.h, which is included in every source file, and it has not compiled correctly. My mistake was that I defined it in the header and the source file instead of declaring it in the header and defining it in my source file. Thanks for clearing that up Tod, I appreciate it!! All better now!

Tony