Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » 2020-03 Arduino Editor unresolved symbols(project builds but editor/indexer shows tons of errors)
2020-03 Arduino Editor unresolved symbols [message #1823433] Thu, 26 March 2020 15:25 Go to next message
juerg maier is currently offline juerg maierFriend
Messages: 8
Registered: March 2020
Junior Member
I am moving my project from Arduino IDE to the more comfortable Eclipse environment as it is said to support Arduino hardware.

I have installed Eclipse 2020-03 using all the default settings and added my files into "exlipse_workspace/<myProjectName>"

I have successfully added my libraries and boards into eclipse with the help of the Arduino Download Manager.

I also added the libraries into my project (project properties/Libraries) and was finally able to build and upload my project for my arduino mega.

Unforturnately Editor and Indexer do not find the libraries (not even Arduino.h) so I get tons of undefined symbols and unresolved imports. Only the imports of my own project modules are correctly resolved.

Found many postings related to these issues but have not been able yet to find a solution with the Eclipse 2020-03 version.

Does anybody know where in the properties of 2020-03 I have to add the Arduino / libraries path's?
Re: 2020-03 Arduino Editor unresolved symbols [message #1824106 is a reply to message #1823433] Wed, 08 April 2020 05:02 Go to previous messageGo to next message
David Gauntt is currently offline David GaunttFriend
Messages: 7
Registered: May 2014
Junior Member
I have been having almost exactly the same problem. I recently installed the plugins "Eclipse C/C++ IDE CD 9.9 (2010-09)" and "Eclipse C++ IDE for Arduino 3.0". I then used the Arduino Downloads Manager to install the "Arduino AVR Boards" and the "LiquidCrystal" library. In my code, the indexer resolves <Arduino.h> but not <LiquidCrystal.h> or "LiquidCrystal.h". I haven't tried this with any other libraries yet.

Note that "LiquidCrystal.h" is located at "/Users/<me>/.arduinocdt/libraries/LiquidCrystal/1.0.7/src/LiquidCrystal.h". The issue is how to get Eclipse to search that path.

I have tried fixing this through the project properties, but there is a "C/C++ General" node in the tree, there is no "C/C++ Build" node, and no references to "library" or "include" in the project properties.

I am using Eclipse 2020-03 installed on an iMac running MacOS 10.14.6 Mojave.

Re: 2020-03 Arduino Editor unresolved symbols [message #1824254 is a reply to message #1824106] Fri, 10 April 2020 20:01 Go to previous messageGo to next message
David Gauntt is currently offline David GaunttFriend
Messages: 7
Registered: May 2014
Junior Member
I found a reasonable workaround, but it involves using the Arduino IDE to install libraries.

1) Install Arduino IDE. This created an "Arduino" folder in my "Documents" folder.

2) Open Arduino IDE.

3) Select the menu item "Sketch / Include Library / Manage Libraries...".

4) The "Library Manager" dialog should appear. Search for the library that you want; eg. LiquidCrystal.

5) The available libraries that match your search options should appear. Select the library that you want, and the version that you want, and click on "Install".

6) The library file should now appear in your "Documents/Arduino/Libraries" folder.

7) Open your Arduino project in Eclipses.

8) Select "File / Import...". In the import tree, open the "General" branch and then the "File System" node under that.

9) A new dialog will appear. Brows to your "Documents / Arduino / Libraries folder, and select that. All libraries in that folder should appear; select the .cpp and .h files in the src folder of your library and click on "Next>" to import them.

10) In any source code modules that should reference the new library, add an include statement like this:
#include "LiquidCrystal.h".
Be sure to use the quotes; this will not work:
#include <LiquidCrystal.h>

Re: 2020-03 Arduino Editor unresolved symbols [message #1824257 is a reply to message #1824254] Sat, 11 April 2020 08:24 Go to previous message
juerg maier is currently offline juerg maierFriend
Messages: 8
Registered: March 2020
Junior Member
Thanks for your advice. It also requires to specify a target directory for the imported files. I selected my project directory and many references work now, I still have unresolved markers with Serial, pinMode, LED_BUILTIN, digitalWrite, sprintf, strtok, atoi etc.
I would have prefered a search path addition for the editor/indexer instead of duplicating so many files.
Still, your solution removed many unresolved markers and that's great.
Previous Topic:Testing for good code?
Next Topic:Indexing Synchronized C++ Projects (PTP)
Goto Forum:
  


Current Time: Thu Sep 19 04:14:56 GMT 2024

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

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

Back to the top