[Buildroot] Trouble linking libroxml

Shawn J. Goff shawn7400 at gmail.com
Thu Mar 21 17:01:08 UTC 2013


On Tue, Mar 19, 2013 at 6:21 PM, Shawn J. Goff <shawn7400 at gmail.com> wrote:
> I'm trying to link use libroxml, but I'm getting errors like this:
>
>     undefined reference to `roxml_load_buf(char*)'
>
> The compiler line looks like this:
>
>     arm-unknown-linux-gnueabi-g++   main.o debug.o modem.o mutex.o
> qmodem.o serial.o util.o -lusb -lrt -lpthread -lm -lcurl -lroxml -o
> modem-monitor
>
> libroxml.so is built and in the target and the sysroot, and
> arm-unknown-linux-gnueabi-nm shows the symbol is present.
>
>
> Is there anything else I might be missing?

kos_tom helped me in the chat room. g++ mangles its symbol names, so
when you link a C library, you have to tell the compiler to treat the
symbols as C symbols instead of c++ symobls. More details are here:
http://stackoverflow.com/questions/67894/why-do-we-need-extern-c-include-foo-h-in-c
.



More information about the buildroot mailing list