Skip to content

Commit 926bd7e

Browse files
committed
Add "extern "C" {" in order to get webui compiling in a C++ environment
to not mangle names in the (shared) library. Signed-off-by: Hans Dijkema <hans@dijkewijk.nl>
1 parent 0758da5 commit 926bd7e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/webui.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
#ifndef _WEBUI_H
1212
#define _WEBUI_H
1313

14+
#ifdef __cplusplus
15+
extern "C" {
16+
#endif
17+
1418
#define WEBUI_VERSION "2.5.0-beta.4"
1519

1620
// Max windows, servers and threads
@@ -1404,4 +1408,8 @@ WEBUI_EXPORT void webui_interface_run_client(size_t window, size_t event_number,
14041408
*/
14051409
WEBUI_EXPORT bool webui_interface_script_client(size_t window, size_t event_number, const char* script, size_t timeout, char* buffer, size_t buffer_length);
14061410

1411+
#ifdef __cplusplus
1412+
}
1413+
#endif
1414+
14071415
#endif /* _WEBUI_H */

0 commit comments

Comments
 (0)