Hi,
I am stuck with a very strange error and was wondering if anyone can help. I have been given the task of updating a USB stack used in our firmware: elm-chan.org/.../00index_e.html
I downloaded the latest source, linked it in to the poroject in place of the previous version and am now getting an error from the line:
typedef unsigned long DWORD;
Looking at the previous version of the code this line was:
typedef unsigned long FFDWORD;
Sure enough, changing the name to anything except DWORD seems to work like a charm, but will require me to track down the rather large number of instances of DWORD and change them to something else. More importantly,
should work!
I am using keil uVision V3.31 and am stuck using that version as the code doesn't compile correctly on later versions.
Does anyone have any ideas? Is this a Keil 3.31 bug, or have I just not set something correctly?
Any help is much appreciated.
To be honest that was what I was wondering, if it thought that DWOERD was a keyword. It shouldn't though as DWORD is not part of the C standard as far as I know.
The error message doesn't sound like the compiler thinks DWORD is a reserved word. More like DWORD is already a #define:d symbol, so the line expands into something more "interesting".
Always look at the preprocessed output when you get really strange compilation errors, just to make sure you will see the same source code line that the compiler itself (after preprocessor expansion) is trying to process.