Issues with ArduinoJson and ili9341_due

I am having some issues with the ArduinoJson Library (version6) and getting my sketch to compile. I think it might have something to do with it not liking something in the ILI9341_due library. Here is the error

In file included from C:\Users\Jamie Smith\Documents\Arduino\Pot_Example\sketch_apr20a\VCV\VCV.ino:4:0: C:\Users\Jamie Smith\Documents\Arduino\libraries\marekburiak-ILI9341_due-ac00f4a/ILI9341_due.h:377:20: error: expected unqualified-id before ‘{’ token #define swap(a, b) { typeof(a) t = a; a = b; b = t; } ^ In file included from C:\Users\Jamie Smith\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/MsgPack/endianess.hpp:8:0, from C:\Users\Jamie Smith\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/MsgPack/MsgPackDeserializer.hpp:9, from C:\Users\Jamie Smith\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:37, from C:\Users\Jamie Smith\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9, from C:\Users\Jamie Smith\Documents\Arduino\Pot_Example\sketch_apr20a\VCV\VCV.ino:8: C:\Users\Jamie Smith\Documents\Arduino\libraries\ArduinoJson\src/ArduinoJson/Polyfills/utility.hpp:11:30: error: expected unqualified-id before ‘{’ token inline void swap(T& a, T& b) { ^ exit status 1 Error compiling for board Arduino Due (Programming Port).

Anyone else had this issue or would know about how I can get these libraries to work together?

Welcome,

As a temporary fix, try to put #undef swap right after #include ILI9341_due.h

Thank you! will give it a go tonight

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