Eclipse cannot resolve type

User avatar
dmdamen
Posts: 15
Joined: Sun Aug 19, 2018 2:47 pm

Eclipse cannot resolve type

Postby dmdamen » Thu Aug 30, 2018 6:31 pm

Not sure this is the right forum but..

Eclipse is driving me nuts. I want to code ESP32 using Eclipse on Linux but I keep running into issues. I have a smaall piece of code that builds and flashed succefully but Eclipse keeps telling me it cannot resolve some types and functions.

I added an include statement that seems to work just fine:

Code: Select all

#include <mutex>
But when I want to declare a mutex or use one of the functions, eclipse is complaining. This statement produces an "cannot resolve" error:

Code: Select all

mutable std::mutex _mtx;
Compiling from the commandline and from eclipse works! No issues there.

I tried importing the @kolban C++ includes but that didn't help.

User avatar
dmdamen
Posts: 15
Joined: Sun Aug 19, 2018 2:47 pm

Re: Eclipse cannot resolve type

Postby dmdamen » Thu Aug 30, 2018 7:53 pm

Found the issue.

I needed to go to Project Properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. -> Providers -> CDT Cross GCC Built-in Compiler Settings and change the command to:

Code: Select all

xtensa-esp32-elf-gcc ${FLAGS} -std=c++11 -E -P -v -dD "${INPUTS}"
I needed to add the -std=c++11 part.

Who is online

Users browsing this forum: No registered users and 76 guests