Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » multiple variable declaration
multiple variable declaration [message #1766755] Mon, 26 June 2017 20:55 Go to next message
adelhorst heinrich is currently offline adelhorst heinrichFriend
Messages: 2
Registered: June 2017
Junior Member
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?

Re: multiple variable declaration [message #1767069 is a reply to message #1766755] Fri, 30 June 2017 10:35 Go to previous message
adelhorst heinrich is currently offline adelhorst heinrichFriend
Messages: 2
Registered: June 2017
Junior Member
I'm sorry. It was my stupid fault. The declaration of the variable was wrong.
I don't know how to close, delete, or mark this topic as to be done.
Thanks.
Previous Topic:IAR Linker Issue
Next Topic:Eclipse NEON CDT is not generating the .O file after build
Goto Forum:
  


Current Time: Fri Apr 26 03:17:09 GMT 2024

Powered by FUDForum. Page generated in 0.02590 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top