espressif / esp-aws-iot

AWS IoT SDK for ESP32 based chipsets
Apache License 2.0
262 stars 157 forks source link

Eclipse IDF include syntax error (CA-52) #21

Open deangenovski opened 4 years ago

deangenovski commented 4 years ago

When importing the project in eclipse, it compiles and runs fine. However all .h files in the aws-iot-sdk have

#ifdef __cplusplus
extern "C" {
#endif

This breaks eclipse parser and everything glows red and shows as error. I don't seem to have any access in the eclipse project to set the compiler. Any suggestions

kolipakakondal commented 4 years ago

Hi, Thanks for reporting the issue. Could you please provide more details to check further on this.

  1. Are you using idf-eclipse-plugin for this? https://github.com/espressif/idf-eclipse-plugin
  2. If you're using idf-eclipse-plugin, make sure you're at the latest. https://github.com/espressif/idf-eclipse-plugin/releases/tag/v1.0.0-rc1 as "unresolved includes" issue got resolved recently.
  3. Have you used import > Espressif >Existing import IDF project option?
  4. Syntax and headers will be resolved only after the project compile with the esp launch target - make sure you're doing this

I've added the above snippet to the existing project and tried - and I couldn't see any error. test

Please provide the sample project to verify the issue