libubox and libubus in C++ code
Username: Zbyněk Kocur
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=1948
Hello,
we try to develop UBUS and UCI application in C++. For now we are not able to compile our applications without patching ubus and libubox in the following way.
[develict@DCompiler ~]$ tmux att -t 8 --- a/libubus.h +++ b/libubus.h @@ -14,6 +14,10 @@ #ifndef __LIBUBUS_H #define __LIBUBUS_H
+#ifdef _cplusplus +extern "C" { +#endif + #include <libubox/avl.h> #include <libubox/list.h> #include <libubox/blobmsg.h> @@ -414,4 +418,8 @@ static inline int ubus_unregister_event return ubus_remove_object(ctx, &ev->obj); }
+#ifdef __cplusplus +} +#endif + #endif
Is it possible to use this libraries without its patching?