Include and C++ compatibility

enitalp
Posts: 60
Joined: Thu Jan 12, 2017 10:03 pm

Include and C++ compatibility

Postby enitalp » Thu Mar 02, 2017 5:17 pm

Those file can't be included directly in a cpp.

Code: Select all

#include <soc/rmt_struct.h> // Generate compilation error
#include <esp_intr.h> // Generate link error
This fix the problem.

Code: Select all

#ifdef __cplusplus
extern "C" {
#endif
#include <soc/rmt_struct.h>
#include <esp_intr.h>
#ifdef __cplusplus
}
#endif
This could be fixed on the sdk side ;p
Thanks

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Include and C++ compatibility

Postby kolban » Thu Mar 02, 2017 6:34 pm

This would make a good issue to report through Github ... see:

https://github.com/espressif/esp-idf/issues
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Who is online

Users browsing this forum: No registered users and 181 guests