I'm trying to use the utility.h header from the standard template library in a c++ project but eclipse will not compile as it complains that it cannot find the header file.
I'm using windows, and followed the most recent instructions for setting up eclipse for use with the esp-idf and have been able to build and modify the included hello_world template. Eclipse seems to be able to find the utility header somehow because it shows it in one of the folders in the Includes drop down in the project explorer, even though I have not manually set any include paths. It's still giving me errors though, and refuses to build.
The included headers from the example seem to be coming from another location entirely, but this path does not have the complete set of header files from the c++ standard library. Has anyone encountered this error before, or know of anything which might help resolve it?
Unresolved inclusion of standard library headers in Eclipse
-
- Posts: 3
- Joined: Mon Jun 25, 2018 9:58 pm
Re: Unresolved inclusion of standard library headers in Eclipse
Hi Improbabilities,
Thanks for mentioning this again. There is a bug in the Build Output parser regular expression set for Eclipse, which means it doesn't properly evaluate headers for C++ files.
It was reported on Github here, and in a comment I (@projectgus) suggest another regex which should work, but the original poster hasn't confirmed the fix and I haven't had a chance to test it either:
If you try the alternative regular expression mentioned here, does it find all the headers correctly? (You may need to do Project -> C/C++ Index -> Rebuild and then build the project again before it updates.)
Angus
Thanks for mentioning this again. There is a bug in the Build Output parser regular expression set for Eclipse, which means it doesn't properly evaluate headers for C++ files.
It was reported on Github here, and in a comment I (@projectgus) suggest another regex which should work, but the original poster hasn't confirmed the fix and I haven't had a chance to test it either:
If you try the alternative regular expression mentioned here, does it find all the headers correctly? (You may need to do Project -> C/C++ Index -> Rebuild and then build the project again before it updates.)
Angus
-
- Posts: 3
- Joined: Mon Jun 25, 2018 9:58 pm
Re: Unresolved inclusion of standard library headers in Eclipse
No luck unfortunately, probably just going to give up on this as it would be less work to rewrite the functions i need at this point. For what it's worth, I'm pretty novice at c/c++ and have never used Eclipse before, so I can't rule out the possibility that something else is setup wrong.
Re: Unresolved inclusion of standard library headers in Eclipse
I'll spin up a fresh Eclipse install today and take a look at this.
-
- Posts: 3
- Joined: Mon Jun 25, 2018 9:58 pm
Re: Unresolved inclusion of standard library headers in Eclipse
For anyone who comes across this looking for a solution to the same problem, I've decided to switch to Visual Studio code as an IDE instead of Eclipse with great success. A useful setup guide can be found here. I guess it's more of a workaround, but I've been much happier with VS code than eclipse.
Thanks for looking into the issues with Eclipse on Windows, and please consider adding a setup guide for VS code to the official IDF documentation.
Thanks for looking into the issues with Eclipse on Windows, and please consider adding a setup guide for VS code to the official IDF documentation.
Re: Unresolved inclusion of standard library headers in Eclipse
Glad you found a workaround. Last week we updated the Eclipse setup guides (Windows / other OSes). There were a couple of small clarifications added as well as the regex. Following these instructions on a clean Windows VM I was able to get both .c and .cpp files resolving all headers after an initial build, but it's easy to miss a step and then things won't resolve correctly.Improbabilities wrote:For anyone who comes across this looking for a solution to the same problem, I've decided to switch to Visual Studio code as an IDE instead of Eclipse with great success. A useful setup guide can be found here. I guess it's more of a workaround, but I've been much happier with VS code than eclipse.
We are looking at both VS Code, and also much simpler and less fiddly Eclipse setup steps, as part of the cmake-based build system.Improbabilities wrote:Thanks for looking into the issues with Eclipse on Windows, and please consider adding a setup guide for VS code to the official IDF documentation.
Re: Unresolved inclusion of standard library headers in Eclipse
There is a video here that expands the functionality of VS from that link.A useful setup guide can be found here. I guess it's more of a workaround, but I've been much happier with VS code than eclipse.
Who is online
Users browsing this forum: pbeam66 and 113 guests