ESP8266 Developer Zone The Official ESP8266 Forum 2015-08-27T21:02:27+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=1015 2015-08-27T21:02:27+08:00 2015-08-27T21:02:27+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1015&p=3464#p3464 <![CDATA[Re: Include files are missing extern "C" for SDK prototypes]]>
Thanks for your valuable advice !

We will add it !

Statistics: Posted by ESP_Faye — Thu Aug 27, 2015 9:02 pm


]]>
2015-08-27T07:23:25+08:00 2015-08-27T07:23:25+08:00 https://bbs.espressif.com:443/viewtopic.php?t=1015&p=3453#p3453 <![CDATA[Include files are missing extern "C" for SDK prototypes]]>

Code:

#if defined(__cplusplus)
extern "C" {
#endif
/* place function prototypes here */
#if defined(__cplusplus)
}
#endif

Doing so simplifies using the SDK routines in C++ files. While it is true that we users can simply wrap the #includes with the same #ifdef, it is something that is expected to be present in professionally produced code.

Statistics: Posted by dkinzer — Thu Aug 27, 2015 7:23 am


]]>