achimdoebler / UGUI

µGUI - Open Source GUI module for embedded systems
Other
1.22k stars 420 forks source link

ugui with arduino/teensy #30

Open epikao opened 6 years ago

epikao commented 6 years ago

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?

GalUnDrux commented 6 years ago

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`

epikao commented 6 years ago

can you show me your sketch code?

GalUnDrux commented 6 years ago

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

jarekkt commented 6 years ago

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.

.

epikao commented 6 years ago

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??