Error in initial compilation

Hello folks
Could you help? I have a problem when trying to upload scetch to the Arduino uno+w5100

The error:
libraries\Cayenne\WidgetRTC.cpp.o (symbol from plugin): In function WidgetRTC::mPin': (.text+0x0): multiple definition of WidgetRTC::mPin’
sketch\WidgetRTC.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Ошибка компиляции для платы Arduino/Genuino Uno.

The code:

//#define CAYENNE_DEBUG         // Uncomment to show debug messages
#define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space
#include <CayenneEthernet.h>



// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token[] = "xxxxxxxxxx";

void setup()
{
  Serial.begin(9600);
  Cayenne.begin(token);
}

void loop()
{
  Cayenne.run();
}

Hi @winnerr, welcome to the Cayenne community

That’s our basic connection sketch so its odd that you’re getting a compiler error referencing that WidgetRTC file. I’m wondering if perhaps it is possible that you have multiple copies of our library installed? Or our library and the Blynk library (which Cayenne is built on)?

Can you check your Documents/Arduino/libraries folder and maybe show a screenshot of what’s installed there? Let me know if you have trouble finding it. Also, just to check, what version of the Arduino IDE do you have installed?

Something else to try here that may resolve things if you have conflicting libraries. Can you change:

#include <CayenneEthernet.h>

to

#include "CayenneEthernet.h"

(changing the angle brackets to quotes)

to see if this has any impact on the compiler error in your case?

Hi @rsiegel

**I’ve changed **
#include <CayenneEthernet.h>

to

#include “CayenneEthernet.h”

NOW it looks like:
#define CAYENNE_DEBUG // Uncomment to show debug messages
#define CAYENNE_PRINT Serial // Comment this out to disable prints and save space
#include “CayenneEthernet.h”
// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.
char token = “xxxxxxxx”;
void setup()
{
Serial.begin(9600);
Cayenne.begin(token);
}
void loop()
{
Cayenne.run();
}

And since I’ve made that change the initial error changed to another one:
n file included from sketch\CayenneEthernet.h:24:0,
from C:\Users\Rustam Sagidov\Documents\Arduino\sketch_mar29a_Cayenne_test1\sketch_mar29a_Cayenne_test1\sketch_mar29a_Cayenne_test1.ino:26:
sketch\BlynkSimpleEthernet.h:20:36: fatal error: Adapters/BlynkEthernet.h: No such file or directory
#include <Adapters/BlynkEthernet.h>
compilation terminated.
exit status 1
Ошибка компиляции для платы Arduino/Genuino Uno.

I’m using IDE 1.8.2

And those are my libraries:

It seems that file with name BlynkEthernet.h is missing. Can you check manually if it is in the library?

Thanks! I double cheked the file - it was on it’s place. Finally I found the solution. Uninstalled Arduino IDE and erased all folders related to it and reinstalled it again. Installed Cayenne lib. and it’s working!
Thank to all you!

Yes, sometimes the arduino ide is bugged. What kind of version of IDE you use?

I use 1.8.2 IDE version

1 Like

Glad to hear that you sorted out. I’d considered this, but I wanted to avoid the ‘wipe-and-reinstall’ suggestion until necessary :slight_smile: