espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.63k stars 7.28k forks source link

eclipse: code assistant show the wrong value for __cplusplus macro (IDFGH-283) #2170

Open dsptech opened 6 years ago

dsptech commented 6 years ago

Environment

Problem Description

cplusplus has value 199711L but it should be 201103L (makefile use -std=gnu++11). Also STDC_VERSION__ has the wrong value in code assistant (but the compiling work fine)

To solve the issue, the settings: -std=gnu++11 and -std=gnu99 must be included in "CDT Cross GCC Built-in Compiler Settings" provider string.

dsptech commented 5 years ago

Hi, the issue is solved also by this workaround: https://github.com/espressif/esp-idf/issues/17#issuecomment-492957856

Regards.