Project created by PlatformIO containing std::function not being recognized by CLion

I created a project with platformio init --ide clion --board nodemcuv2

I’m using the library ESP8266WebServer.h, and the IDE cannot recognize the code as valid:

Did you rebuild project C/C++ Index? See Redirecting...

Hi @ivankravets, yes, I have rebuilt the index without success.

@ivankravets, would you like to reproduce it in your environment? You may try to download and import this project into your CLion: https://www.hackster.io/rayburne/esp8266-captive-portal

It is a very similar problem:

Please check Cmake’s files located in the root of a project. Do they contain all include paths?

@averri - I have the exact same problem… did you manage to solve it ?

Actually i’ve found a fix

Adding the following to Cmake fixes the issue.
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

1 Like