I have two computers with CodeWarrior IDE version 5.9.0 installed. With one, my code compiles with no errors at all, but with the other the exact same code has suddenly begun to produce a warning and an error:
C1135: Ignore Storage Class Specifier cause it only applies on objects
MC9S08GB60A.h line 896
and
Error: C2801: ';' missing
MC9S08GB60A.h line 1064
Both errors point to the same section of the header file for the MC9S08GB60A.h that relates to the SCI1BDL definition. The file has not been modified in any way. In fact, I deleted and re-copied the entire contents of the containing folder, then, in desperation, I re-installed codewarrior without results. Nothing i have done fixes this problem. I have tried starting an entirely new project with only the starting code in main.c and still get the same error. I have looked for some sort of ini file to over-write but cannot find such. This is very frustrating and I have run out of ideas.
PLEASE HELP!!
Dan
解決済! 解決策の投稿を見る。
Hello,
strange things could happen e.g. if you have modified another header file and entered some characters by mistake. What I do in such cases is to produce a pre-processor listing file (compiler option -Lp) or using the 'preprocess' context menu on the source (in MCU10.x). And then inspect the produced file.
If you do not spot the error: save that file with a .c extension and compile it: that way (at least for me) it was always easy to spot the error.
Hope this helps,
Erich
Hello,
strange things could happen e.g. if you have modified another header file and entered some characters by mistake. What I do in such cases is to produce a pre-processor listing file (compiler option -Lp) or using the 'preprocess' context menu on the source (in MCU10.x). And then inspect the produced file.
If you do not spot the error: save that file with a .c extension and compile it: that way (at least for me) it was always easy to spot the error.
Hope this helps,
Erich
Thanks for the reply Erich. My first thought when this problem surfaced was that I inadvertently modified the header file, so I copied a fresh "un-altered" version into the folder where the header files reside from the PC that compiles the code without error. Neither that, nor re-installing the entire Codewarrior application fixed the problem. I'll try and muddle through what you have suggested. I'm very new at this so I'm not exactly sure what you are talking about. I'll give it a try.
Thanks again!
Dan
The preprocessor listing is what the compilers 'sees' after preprocessing the files (resolving all the macros, etc), see http://en.wikipedia.org/wiki/Preprocessor
The error is not necessarily in the header file reported in the error: it could be in the source file where you include that header file (or other header files which include that header file, etc). So it could be that you entered some characters in your own sources.
If you are using the Eclipse version of CodeWarrior: Eclipse is pretty good in showing this kind of errors in the Editor too.
Hope this helps,
Erich
It's fixed. There WAS a missing variable name in the definition for SCI1BDL in the header file. The pre-process output showed the difference, or at least where it was. I really figured copying over the file would replace and fix anything that was corrupted, but there must be a reference to somewhere else. Don't know, but it's working now!
Thanks for your help!!
Dan