Compile error: redefinition of 'Display_SSD1306_I2C::~Display_SSD1306_I2C()'

I just synch’d my fork with the copter-3.5 branch and received this error when attempting to compile the code. I had to resolve some merge conflict but the only merge conflict I had in that library was with the Display_SH1106_I2C.cpp file. Here is a link to my fork

this is the first time I have tried to update my fork to make it current with the ardupilot repository. any help would be appreciated. below is the listing of the error.
/home/sitl/ardupilot/libraries/AP_Notify/Display_SSD1306_I2C.cpp:43:1: error: redefinition of 'Display_SSD1306_I2C::~Display_SSD1306_I2C()'
compilation terminated due to -Wfatal-errors.
make: *** [/tmp/] Error 1


I’d recommend resetting the branch using:

  • git reset --hard upstream/Copter-3.5
  • git submodule update --recursive

and then maybe do a clean. I still use “make” 'cuz I’m on windows so I’d use “make px4-clean” but that may not be necessary and I’m not immediately sure if that’s required when using “waf” and whether “waf” has an equivalent.

Thanks for the quick response! So when I synch’d I followed what was on github tutorial. I added the remote and called it upstream. I fetched upstream and then merged upstream for the branch that I wanted to synchronize. I did master first and that seemed to work fine meaning there were no merge conflicts. I was a little confused that I got merge conflicts when synching copter-3.5 branch. So I’m confused as to why you have me doing a reset with upstream/Copter-3.5. I’ve done hard resets for the HEAD~ which essentially deletes the previous commit. What is this doing? And is it acting on the remote local upstream repository or my local Ardupilot fork? Just trying to understand what this is doing.
Thanks again!

Thanks for the advice. That worked.