ArduinoMenu icon indicating copy to clipboard operation
ArduinoMenu copied to clipboard

After defining MENU_DEBUG project doesn't compile for ESP32

Open ScruffR opened this issue 2 years ago • 1 comments

I need to debug the library but cannot get it to compile on my Adafruit HUZZAH32 Feather.

I first had this

#define ARDUINO_STREAMING           // import: Streaming library (v6.1.1)
#define MENU_DEBUG
#define MENU_DEBUG_OUT Serial

Which threw some errors

.../itemsTemplates.hpp:149:42: error: 'endl' was not declared in this scope
     _trace(Serial<<"toggle sysHandler!"<<endl;);

so I added

#define endl           "\r\n"

which got rid of the above error but ended up failing to link due to errors like these

undefined reference to `Menu::print_P(Print&, char const*, short)'
undefined reference to `Menu::operator<<(Print&, bool)'

(in multiple functions)

ScruffR avatar Sep 10 '23 12:09 ScruffR

Hi, did you have any luck getting this up and running on your side? I made a number of guesses to get the WebMenu example design compiling on my ESP32, and one of them was for the second linking error you listed:

namespace Menu { Print& operator<<(Print& out, bool value) { out.print(value ? "true" : "false"); return out; } };

ppsoukup avatar Feb 16 '25 18:02 ppsoukup