Closed dtila closed 2 years ago
Fixed. Information found in the documentation
Hi @dtila , I am having the same issue, would you be able to point me to the part of the documentation describing how to fix this? Thanks
You have to include the .cpp
file as well. But if you have any further questions, ask on the discord server or one of the forums.
The problem
The build is ok but the linker give me the error:
/config/plantwatering.yaml:12: undefined reference to
PlantDiscovery::PlantDiscovery()'`All the documentation for a custom component is the code is in the header file. Can you have code in header and cpp file, when you build a custom component for esphome?
In case, how you specify the cpp files to be linked?
Which version of ESPHome has the issue?
docker version - latest
What type of installation are you using?
Docker
Which version of Home Assistant has the issue?
No response
What platform are you using?
ESP8266
Board
No response
Component causing the issue
No response
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response