UGUI icon indicating copy to clipboard operation
UGUI copied to clipboard

ugui with arduino/teensy

Open epikao opened this issue 7 years ago • 5 comments

Hello, I try to implemente ugui with arduino/teensy 3.2, but unfortunately if I implement in the sketch #include "ugui.c" I get follow error:

invalid conversion from 'void*' to 'void ()(UG_COLOR) {aka void ()(long unsigned int)}' [-fpermissive]

?? whats wrong?

epikao avatar Apr 30 '18 18:04 epikao

Hi, i have a similar issue when trying to compile for teensy 3.2, i get the following message:

`uGUI_Test: In function 'void loop()': uGUI_Test:64: warning: ISO C++ forbids converting a string constant to 'char*' UG_PutString (0,0, "Beginning System Initialization");

                                                   ^

uGUI_Test:68: warning: ISO C++ forbids converting a string constant to 'char*' UG_PutString (0,0, "System Initialization Complete");

                                                  ^

C:..\AppData\Local\Temp\arduino_build_677234\sketch\uGUI_Test.ino.cpp.o: In function `main':

C:..\Arduino\uGUI_Test/uGUI_Test.ino:48: undefined reference to `UG_Init(UG_GUI*, void (*)(short, short, unsigned long), short, short)'

collect2.exe: error: ld returned 1 exit status`

GalUnDrux avatar May 09 '18 18:05 GalUnDrux

can you show me your sketch code?

epikao avatar May 23 '18 04:05 epikao

I've moved on to another display which means I don't need the ugui, thank you though!

GalUnDrux avatar May 23 '18 07:05 GalUnDrux

What you have noticed are actually bugs in uGui. They are known - but the author never merged fixes from other people.

Basically - several functions miss 'const' attributes from their arguments. This causes sever issues for architectures which access 'const' variables ( mostly texts) differently then variables.

.

jarekkt avatar May 23 '18 07:05 jarekkt

Basically - several functions miss 'const' attributes from their arguments. This causes sever issues for architectures which access 'const' variables ( mostly texts) differently then variables.

what do you think, is it difficult to fix that problem? Or just need to change some variable, functions type??

Because is really only one error: invalid conversion from 'void*' to 'void ()(UG_COLOR) {aka void ()(long unsigned int)}' [-fpermissive]

it cannot be so complicated to solve that??

epikao avatar May 23 '18 09:05 epikao