DC 9.62 "error is out of scope / not declared" referencing line 21 no matter what is actually on that line.

I have changed the order of the #define statements and it still shows as line 21. i tried replacing the first 100 lines of the program from a prior version that still compiles without error, but in this program i get the error pointing to “line 21”. It actually creates 3 errors 3 time in sequence - “out of scope”, “assignment to read-only not allowed”, “invalid expression- need lvalue”. The statements around line 21 are all #define statements for the serial buffer sizing. (AINBUFSIZE thru FOUTBUFSIZE) Any Suggestions?

Make sure your not missing a library, this type of errors can generate from a missing library. Try doing a grep.

1 Like

Hello, I hope you might opened the library file on Dynamic C 9.62 IDE, then tried to compile the file? If you opened any library file, close the file then compile.

Also check that, how are you compiling the program? Directly are you compiling the program by attaching the target OR Target less compile?

Before compiling the application choose correct settings in the Dynamic C IDE.

1 Like

I seem to recall instances where the compiler would report the correct line number, but the wrong file. If you watch the compilation, you might be able to figure out which file it’s in when it generates the error.

Have you modified any of the libraries?

Are you using valid settings for the serial buffers? Remember that they need to be 1 less than some power of 2. For example, 7, 15, 31, 63, 127, etc.

1 Like

I actually gave up and rebuilt the program updates from a backup copy and now it is completely functional. However i was not aware of the “1 less than a power of 2” for the serial buffers so i will address that, thanks.