Page 1 of 1

Include and C++ compatibility

Posted: Thu Mar 02, 2017 5:17 pm
by enitalp
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

Re: Include and C++ compatibility

Posted: Thu Mar 02, 2017 6:34 pm
by kolban
This would make a good issue to report through Github ... see:

https://github.com/espressif/esp-idf/issues