[OpenWrt-Devel] Can't link to ubus / ubox from C++ package

Yousong Zhou yszhou4tech at gmail.com
Wed Jul 22 07:40:49 EDT 2015


On 22 July 2015 at 19:34, Tomer Eliyahu <tomereliyahu1 at gmail.com> wrote:
> Hi,
>
> Sorry if I am repeating this question (I posted it in the developers
> forum and stackoverflow), but I am out of luck for 3 days now and come
> to think it might be an openwrt bug, forgive me if i'm mistaken..
>
> I am writing a GUI for openwrt which uses UBUS to get indications for
> system status.
>
> For some reason, I can't get it to compile with ubus / ubox - I keep
> getting the same error:
>
> [color=#FF0000]/local/store/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_uClibc-0.9.33.2_eabi/ilixi_mgui-source/src/UBusThread.cpp:11:
> undefined reference to `uloop_init()'[/color]
>

As a temporary workaround, you can try surrounding libubox and libubus
headers with "extern "C" {}".

                yousong
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list