Closed GermanSheepDog closed 4 years ago
If you want to call esp-homekit C API from your C++ code, just wrap #include statements with extern "C" {}
:
#include <iostream>
extern "C" {
#include <homekit/homekit.h>
#include <homekit/characteristics.h>
}
This is a quick fix you can do right now, I will think about implementing it in the library itself.
Hello Maxim,
I used your very good esp-homekit-library to control some equipment for example a freezer. It worked fine and since some month it is stable.
Now I integrate a gesture sensor and most libraries was written in C++. Only the library from manufacturer of ESP32 was written in C - but it didn't work for me.
So I need to integrate and mix C and C++. It would help me, if I can use esp-homekit-library without any change in my environment.
Please add this at your header-file "homekit.h":
It is the same standard used in cJSON.h.
Many thanks in advance.