Jomelo / LCDMenuLib2

Create a tree menu. Use it with different lcd types / console output / ssh console.
MIT License
249 stars 46 forks source link

Exporting a project to VSC #80

Closed AlexArGC closed 1 year ago

AlexArGC commented 3 years ago

Good afternoon. I'm just learning C ++. Why doesn't the example compile? The VSC compiler (1.58.2) swears at lines like: LCDML_add (0 , LCDML_0 , 1 , "Mode" , mFunc_mode);

no instance of constructor "LCDMenuLib2_menu::LCDMenuLib2_menu" matches the argument list -- argument types are: (int, int, int, void (), int)C/C++(289)

And also swears at: LCDML.SCREEN_enable(mFunc_screensaver, 10000); // set to 10 seconds

argument of type "void (*)()" is incompatible with parameter of type "LCDML_FuncPtr_pu8"C/C++(167)

Jomelo commented 3 years ago

Hello, are you using the arduino IDE ? On my current version 1.8.12 and 1.8.15 there are no errors. I think when you are using another editor the includes are in the wrong order.

AlexArGC commented 3 years ago

I am sorry for disturbing you. Understood :-) I tried to adapt the VSC + PlatformIO code. Everything worked out when I fixed the header files. Thank you so much for such a great library!

rsp-git commented 2 years ago

I am sorry for disturbing you. Understood :-) I tried to adapt the VSC + PlatformIO code. Everything worked out when I fixed the header files. Thank you so much for such a great library!

Can you tell me what you've done? I have a simillar issue.

AlexArGC commented 2 years ago

I am sorry for disturbing you. Understood :-) I tried to adapt the VSC + PlatformIO code. Everything worked out when I fixed the header files. Thank you so much for such a great library!

Can you tell me what you've done? I have a simillar issue.

The easiest way is to combine the code into a .h and .cpp file.

Jomelo commented 1 year ago

I add a plattform io example to the master version. I test it with VSC.