I’m trying to compile my code to OS2.0.0-rc.1 and am getting a bunch of new errors compared to compiling to OS1.5.1. In particular, I’m getting this error and not sure how to fix. Does anyone have an idea how to fix it?
/usr/local/gcc-arm-embedded/arm-none-eabi/include/math.h: At global scope:
Pixels.h:81:29: error: expected ')' before '(' token
81 | #define round(X) ((uint16_t)(((float)(X))+0.5))
| ~ ^
I just got back from holidays and tried to compile on (update VSC workbench) using 2.0.0-RC.1 - I get a number of warnings about sprintf and these errors:
In file included from /Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.cpp:36:
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.h:118:7: error: deleted function 'virtual Adafruit_SPITFT::~Adafruit_SPITFT()' overriding non-deleted function
118 | class Adafruit_SPITFT : public Adafruit_GFX {
| ^~~~~~~~~~~~~~~
In file included from /Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.h:26,
from /Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.cpp:36:
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_GFX.h:13:7: note: overridden function is 'virtual Adafruit_GFX::~Adafruit_GFX()'
13 | class Adafruit_GFX : public Print {
| ^~~~~~~~~~~~
In file included from /Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.cpp:36:
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.h:118:7: note: 'virtual Adafruit_SPITFT::~Adafruit_SPITFT()' is implicitly deleted because the default definition would be ill-formed:
118 | class Adafruit_SPITFT : public Adafruit_GFX {
| ^~~~~~~~~~~~~~~
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.h:404:9: error: union member 'Adafruit_SPITFT::<unnamed union>::hwspi' with non-trivial 'Adafruit_SPITFT::<unnamed union>::<unnamed struct>::~<constructor>()'
404 | } hwspi; ///< Hardware SPI values
| ^~~~~
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.cpp: In constructor 'Adafruit_SPITFT::Adafruit_SPITFT(uint16_t, uint16_t, int8_t, int8_t, int8_t)':
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.cpp:248:67: error: use of deleted function 'virtual Adafruit_SPITFT::~Adafruit_SPITFT()'
248 | int8_t dc, int8_t rst) : Adafruit_SPITFT(w, h, &SPI, cs, dc, rst) {
Guess this has something to do with the SPISettings class - clearly need to spend some effort to get things to recompile with the new device OS. I assume the libraries used in this case:
Fix compiler error for error: deleted function 'virtual Adafruit_SPITFT::~Adafruit_SPITFT()' overriding non-deleted function with 2.0.0-rc.1 caused by the new gcc compiler treating this as an error.
Also upgraded these libraries that use Adafruit_GFX_RK:
In file included from /Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.h:26,
from /Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.cpp:36:
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_GFX.h:6: warning: "ARDUINO" redefined
6 | #define ARDUINO 157
|
In file included from ./inc/SPI.h:1,
from /Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.h:25,
from /Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.cpp:36:
./inc/Arduino.h:16: note: this is the location of the previous definition
16 | #define ARDUINO 10800
|
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.cpp:563:5: warning: "SPI_INTERFACES_COUNT" is not defined, evaluates to 0 [-Wundef]
563 | #if SPI_INTERFACES_COUNT > 0
| ^~~~~~~~~~~~~~~~~~~~
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.cpp:566:5: warning: "SPI_INTERFACES_COUNT" is not defined, evaluates to 0 [-Wundef]
566 | #if SPI_INTERFACES_COUNT > 1
| ^~~~~~~~~~~~~~~~~~~~
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.cpp:569:5: warning: "SPI_INTERFACES_COUNT" is not defined, evaluates to 0 [-Wundef]
569 | #if SPI_INTERFACES_COUNT > 2
| ^~~~~~~~~~~~~~~~~~~~
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.cpp:572:5: warning: "SPI_INTERFACES_COUNT" is not defined, evaluates to 0 [-Wundef]
572 | #if SPI_INTERFACES_COUNT > 3
| ^~~~~~~~~~~~~~~~~~~~
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.cpp:575:5: warning: "SPI_INTERFACES_COUNT" is not defined, evaluates to 0 [-Wundef]
575 | #if SPI_INTERFACES_COUNT > 4
| ^~~~~~~~~~~~~~~~~~~~
/Users/wjsteen/Documents/Intelligent_Furniture_Project/VSC_Projects/zioxi-trolley-base/lib/Adafruit_GFX_RK/src/Adafruit_SPITFT.cpp:578:5: warning: "SPI_INTERFACES_COUNT" is not defined, evaluates to 0 [-Wundef]
578 | #if SPI_INTERFACES_COUNT > 5
| ^~~~~~~~~~~~~~~~~~~~
Previously I have fixed these but just wondered when you compile whether you get the same ?
I did not see that, but the problem is that long long int (64-bit signed) is not a valid type to pass to insertValue. If you really need 64-bit support you’ll need to manually convert it. If the value isn’t really that long, you’ll need to cast to 32-bit value like long instead.