diff --git a/include/geode-ipc.h b/include/geode-ipc.h index 77866b8..4ee1787 100644 --- a/include/geode-ipc.h +++ b/include/geode-ipc.h @@ -3,6 +3,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /** * Send IPC message. Response needs to be freed. * Message is NULL if Geode IPC could not be connected to. @@ -15,3 +19,7 @@ char* geode_ipc_send(char const* message); * Message is NULL if Geode IPC could not be connected to. */ char* geode_ipc_send_timeout(char const* message, double timeout); + +#ifdef __cplusplus +} +#endif \ No newline at end of file diff --git a/include/geode-ipc.hpp b/include/geode-ipc.hpp index 47fd089..9bfa886 100644 --- a/include/geode-ipc.hpp +++ b/include/geode-ipc.hpp @@ -1,10 +1,6 @@ #include #include -extern "C" { -#include "geode-ipc.h" -} - namespace GeodeIPC { /** * Send raw string and accept raw value. Not recommended, diff --git a/src/geode-ipc.cpp b/src/geode-ipc.cpp index 263fa86..2ad61c3 100644 --- a/src/geode-ipc.cpp +++ b/src/geode-ipc.cpp @@ -1,5 +1,6 @@ #include -#include +#include + using namespace geode; using namespace matjson;