Go Down

Topic: Windows/Linux/Mac Eclipse plugin to compile and upload arduino sketches (Read 292273 times) previous topic - next topic

Jantje

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

innodron

Importing Cayenne also imports ESP8266Wifi, Ethernet, SD, SPI, Wifi, and Wire libraries.  Various files from the three Wifi-related libraries cause multiple definition errors.
I am experiencing a very similar issue that, including Blynk (via menu Arduino--> Add a library to the selected project or through having #include <Blynk.h>), Sloeber imports Ethernet, SD, SPI, Wifi. Which causes compilation errors like redefinition of 'class WiFiUDP', ...:

Code: [Select]

In file included from /Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.cpp:29:0:
/Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.h:27:7: error: redefinition of 'class WiFiUDP'
 class WiFiUDP : public UDP {
       ^
In file included from /Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/utility/wifi_drv.h:26:0,
                 from /Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.cpp:26:
/Users/ozkanserin/Developer/cpp/hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiUdp.h:32:7: error: previous definition of 'class WiFiUDP'
 class WiFiUDP : public UDP, public SList<WiFiUDP> {
       ^
/Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.cpp: In constructor 'WiFiUDP::WiFiUDP()':
/Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.cpp:35:22: error: class 'WiFiUDP' does not have any field named '_sock'
 WiFiUDP::WiFiUDP() : _sock(NO_SOCKET_AVAIL) {}
                      ^
/Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.cpp: In member function 'virtual uint8_t WiFiUDP::begin(uint16_t)':
/Applications/EclipseCPP.app/Contents/Eclipse/arduinoPlugin/libraries/WiFi/1.2.6/src/WiFiUdp.cpp:45:9: error: '_sock' was not declared in this scope
         _sock = sock;


@chantling

The bad news is:
What you are experiencing is a weel known issue with Sloeber with a workaround described here.
https://www.patreon.com/posts/defines-before-6795548
Unfortunately I cannot view the content in this link; saying patrons only  ::) .



The good news is that I released V.4 and V4.0 fixed this problem.
I have the plugin version 4.1.0.201705252335, on a newly installed Eclipse CDT Oxygen 4.7.1 on Mac OSX.


I have tried;
- deleting the release folder,
- then menu:Arduino--> Add a library, deselect Ethernet, SD, SPI, WiFi leaving Blynk checked
- they disappear from includes in Project Explorer however for a brief while, until plugin adds them again
during workspace rebuild

I had been happily developing for an ESP8266 Thing Developer with this plugin without an issue until I had  to add Blynk libraries. The sketch compiles fine with Arduino IDE (which I do not want to use unless I have no other option).

A simple Blynk example without any extra code does not compile either, complaining about same multiple-definitions in WiFi library.

I will appreciate any help. Thanks in advance.

Jantje

Setting the cdt indexer settings as described here should fix this issue.
https://github.com/Sloeber/arduino-eclipse-plugin/issues/825
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

proddy

Hi everyone, ESP8266 question

Just made the switch from PlatformIO to Sloeber as I miss working in a real IDE.

Installed the latest 4.1 (also tried the nightly build) but don't see ESP8266 in the Paltforms/Boards as it's described in the video https://www.youtube.com/watch?v=S_QTMNhaDwM .

Am I missing something?


Jantje

ESP8266 have changed something on their server causing the file to fail to download
see this issue for more detail https://github.com/Sloeber/arduino-eclipse-plugin/issues/743
I copied the file to my server and added code to download this file instead of the original one but that caused issues as well
So I have removed this in mylatest version.
ESP8266 never responded to my questions on how to download  the file. I can't even understand why they put limitations on the download anyways
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

proddy

Ah ok. I managed to get it working by adding "http://arduino.esp8266.com/stable/package_esp8266com_index.json"  to the 3rd party URL list.

innodron

Setting the cdt indexer settings as described here should fix this issue.
https://github.com/Sloeber/arduino-eclipse-plugin/issues/825
I had upgraded the plugin today to 4.1.0.20171003 from nightly builds before I saw your response. After the upgrade the issue had been resolved somehow - without changing indexer settings - no longer giving duplicate definition compilation errors, although the plugin had added a few libraries

Then, I made changes to the indexer as you suggested above. Removed Blynk and additional libraries from the project, cleaned and added Blynk again. This time no additional library added to the project.

It seems all issues resolved. Thanks for the help.

Jantje

>It seems all issues resolved. Thanks for the help.

good

As an independent open source project we value your submission, but we ask for support, either by helping us out coding (yeah, we do understand it does require time) or a Patreon contribution (starting from as low as 1$ a month): this allows us to support people who support us back!
As a supporter you can drag our attention and prioritize your submission...
please become a supporter!
https://www.patreon.com/jantje
Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Go Up