Neopixel and USB Host Shield Library conflict

I have two libraries that are conflicting with each other. I am getting several instances of the following error:

[color=#201f1e]In file included from C:\Users\timhe\Documents\Arduino\libraries\NeoPatterns\src/NeoPatterns.h:45:0,[/color]
[color=#201f1e]                 from C:\Users\timhe\Documents\Arduino\Chopper-SHADOW\Chopper-SHADOW.ino:97:[/color]
[color=#201f1e]C:\Users\timhe\Documents\Arduino\libraries\NeoPatterns\src/NeoPixel.h:60:28: error: 'uint8_t Red(color32_t)' redeclared as different kind of symbol[/color]
[color=#201f1e]uint8_t Red(color32_t color);[/color]
[color=#201f1e]                            ^[/color]
[color=#201f1e]In file included from C:\Users\timhe\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/PS3Enums.h:21:0,[/color]
[color=#201f1e]                 from C:\Users\timhe\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/PS3BT.h:22,[/color]
[color=#201f1e]                 from C:\Users\timhe\Documents\Arduino\Chopper-SHADOW\Chopper-SHADOW.ino:88:[/color]
[color=#201f1e]C:\Users\timhe\Documents\Arduino\libraries\USB_Host_Shield_Library_2.0/controllerEnums.h:47:9: note: previous declaration 'ColorsEnum Red'[/color]
[color=#201f1e]         Red = 0xFF0000,[/color]
[color=#201f1e]         ^~~[/color]

In the past, I have gone into one of the library's source code and renamed the colors. This will resolve the error. However, every time the library is updated, the error obviously returns.

Is there something I can do in my code to keep these libraries from colliding?



Don’t update :wink: I’ve switched all that crap off.

If you make the library local to your sketch, updates are not affecting it. You will need to change the includes to use “somefile.h” or to “src\yourlib\somefile.h” instead of <somefile.h>; depends on where you placed the library.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.