FreeRTOS / iot-reference-esp32

MIT License
75 stars 45 forks source link

[BUG] Project fails to link when compiled as C++ #65

Closed txf- closed 8 months ago

txf- commented 8 months ago

Describe the bug app_wifi, core_mqtt_agent_manager and subscription_manager are not linking in a C++ project.

Expected behavior The headers files are missing the indication to treat these as C linkage.

#ifdef __cplusplus
extern "C" {
#endif

/*FUNCTION PROTOTYPES*/

#ifdef __cplusplus
}
#endif

I don't know if this is done on purpose or it is a bug.

ericbj29 commented 8 months ago

Hi @txf-, thanks for bringing this to our attention. This is a bug. If you are willing, we would appreciate it if you could open a PR fixing the issue. If not, I'm happy to do so as well. Thanks again!

ericbj29 commented 8 months ago

If you do decide to raise a PR, please double check the other header files. It seems core_mqtt_agent_manager_events.h needs to be updated as well.