multiple variable declaration [message #1766755] |
Mon, 26 June 2017 16:55  |
Eclipse User |
|
|
|
Hello Friends.
I just started programming Arduino over Eclipse Neon C++ IDE for Arduino 2.0.
I already had done some projects with Eclipse in C/C++ and Java etc...
Now I am playing a little around the Arduino UNO and I have got one problem:
I have a 'main.cpp' file with a program to test the liquid crystal lcd. This was working very well on the proto shield plus board.
But now I added and include two more files: "MyLCD.h" and "MyLCD.cpp" to make my own standard for this kind of display.
In "main.cpp" I have a variable => "MyLCD _lcd();"
and in "MyLCD" I have there a private variable with the same name => "LiquidCrystal_I2C _lcd (0x20,16,2);".
(I have already tested that the second variable is definitive private and NOT PUBLIC! There is no declaration for this variable in "MyLCD.h"!)
On build this project, I get a fault message cause of multiple variable declaration of "_lcd"! And after transfer this build is not running on the Arduino.
After changing the first variable name "_lcd" to "_lcd1" (only) in "main.cpp" everything is ok. The build runs without problem and the program runs on the arduino without problem.
Is this a bug in the IDE? Someone with the same experience?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03668 seconds