diff --git a/include/astaroth.h b/include/astaroth.h
index 2df267d..b45db11 100644
--- a/include/astaroth.h
+++ b/include/astaroth.h
@@ -18,6 +18,10 @@
*/
#pragma once
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include "astaroth_defines.h"
typedef struct {
@@ -208,3 +212,7 @@ acSetParam(const AcReal3Param param, const AcReal3 value, AcMeshInfo* info)
info->real3_params[param] = value;
}
*/
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/include/astaroth_defines.h b/include/astaroth_defines.h
index f05685b..222dc9e 100644
--- a/include/astaroth_defines.h
+++ b/include/astaroth_defines.h
@@ -17,6 +17,11 @@
along with Astaroth. If not, see .
*/
#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include // FLT_EPSILON, etc
#include // size_t
#include // CUDA vector types (float4, etc)
@@ -110,3 +115,7 @@ extern const char* int3param_names[];
extern const char* realparam_names[];
extern const char* real3param_names[];
extern const char* vtxbuf_names[];
+
+#ifdef __cplusplus
+} // extern "C"
+#endif