Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer can compile with errors from library #7

Open
ubergeekseven opened this issue Jul 11, 2021 · 3 comments
Open

No longer can compile with errors from library #7

ubergeekseven opened this issue Jul 11, 2021 · 3 comments

Comments

@ubergeekseven
Copy link

It has been a couple years since building some devices and I thought I would create a few more. Tried original code I had with original setup in vscode with pio. Had it working great at one point. Would not compile. vscode is ridiculous and pio only adds to that. Anyway, I uninstalled all the libraries, reinstalled and updated everything. went through all information on all dependencies and now I am almost there but this library is throwing something I have not encountered before.

this is the output when I try now:

.pio\libdeps\d1_mini\LeifHomieLib\src\HomieNode.cpp: In member function 'void HomieProperty::OnMqttMessage(char*, char*, AsyncMqttClientMessageProperties&, size_t, size_t, size_t)':
.pio\libdeps\d1_mini\LeifHomieLib\src\HomieNode.cpp:387:15: error: aggregate 'std::string temp' has incomplete type and cannot be defined
387 | std::string temp;
| ^~~~
Compiling .pio\build\d1_mini\FrameworkArduino\WString.cpp.o
*** [.pio\build\d1_mini\lib225\LeifHomieLib\HomieNode.cpp.o] Error 1

Any insight on this would be great. This project worked so well once compiled and has been in several lighting setups in my home with openhab and the auto discovery through the homie setup. Would prefer to try and use this again.

@ubergeekseven
Copy link
Author

I went down a rabbit hole over the past 4 hours and found something to grab at. Had no idea it would be needed or why because I did not write this library but, I had to declare #include for it to resolve itself. it compiled after that but I have no idea why the rest of the std lines worked without issue.

@rdu70
Copy link

rdu70 commented Jan 7, 2022

I'm stuck with the same problem. What #include did you insert and where ?
Thanks

@rdu70
Copy link

rdu70 commented Jan 7, 2022

I found the answer:
Need to add :
#include
in HomieNode.h
I added at line 5 after #include
Please update the repo
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants