Closed pjanning closed 1 year ago
github issues are not for support for external components unless you can show that it's a bug in esphome. However, logging is working for everyone else's components. If you need help, then come ask on the esphome discord server or one of the forums.
The component is using a standard logging function... The error is in ESPHome and not in someone elses lib...
src/esphome/core/log.h:105:3: error: 'esp_log_printf_' was not declared in this scope esp_log_printf_(ESPHOME_LOG_LEVEL_INFO, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
This issue is the same as #3196; when the ESP_LOGD
macro is expanded by the compiler, it looks for esp_log_printf_
which is not in the global namespace--it's in esphome::esp_log_printf_
. The real "fix" would be to move it into the global namespace, assuming there are no conflicts.
For the short term, you can do something like the following:
using esphome::esp_log_printf_;
... at the top of wherever you're using the ESP_LOG*
macros.
You can also use things like using namespace esphome
but this will pollute your namespace. If you're not sure, use the first one.
The problem
While trying to build with an external library i always get the error, that a logging function is not declared in scope.
Which version of ESPHome has the issue?
2023.7.0
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2023.7
What platform are you using?
ESP32
Board
wemos_d1_mini32
Component causing the issue
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response