Home/Support/Support Forum/DC 9.62 "error is out of scope / not declared" referencing line 21 no matter what is actually on that line.
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

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

0 votes
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?
asked Sep 17, 2015 in Rabbit Software by dfzevacor New to the Community (3 points)

Please log in or register to answer this question.

3 Answers

+1 vote
Make sure your not missing a library, this type of errors can generate from a missing library. Try doing a grep.
answered Sep 17, 2015 by Campbell Veteran of the Digi Community (684 points)
+1 vote
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.
answered Sep 21, 2015 by cpigilam Veteran of the Digi Community (655 points)
+1 vote
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.
answered Oct 6, 2015 by TomCollins Veteran of the Digi Community (1,870 points)
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.
...