1

I am trying to compile GMediaRender on Ubuntu 12.04. I got an error during make:

gcc  -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -L/usr/lib  -o gmediarender  main.o upnp.o upnp_control.o upnp_connmgr.o upnp_transport.o upnp_device.o upnp_renderer.o webserver.o output_gstreamer.o xmlescape.o -pthread -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lxml2 -lglib-2.0   -lupnp  
/usr/bin/ld: upnp.o: undefined reference to symbol 'ixmlDocument_createElementNS'
/usr/bin/ld: note: 'ixmlDocument_createElementNS' is defined in DSO /usr/lib/libixml.so.2 so try adding it to the linker command line
/usr/lib/libixml.so.2: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [gmediarender] Error 1

I tried to add -lixml2 and -L/usr/lib/libixml.so.2, but I got this:

gcc  -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -L/usr/lib -L/usr/lib/libixml.so.2 -o gmediarender  main.o upnp.o upnp_control.o upnp_connmgr.o upnp_transport.o upnp_device.o upnp_renderer.o webserver.o output_gstreamer.o xmlescape.o -pthread -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lxml2 -lglib-2.0   -lupnp -lrt -lixml2
/usr/bin/ld: cannot find -lixml2
collect2: ld returned 1 exit status

please help me get out from here - I am a newbie

1 Answer 1

2

finally I found the solution for this problem on this page so I added /usr/lib/libixml.so.2 explicitly to gcc parameters:

gcc -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -L/usr/lib -o gmediarender main.o upnp.o upnp_control.o upnp_connmgr.o upnp_transport.o upnp_device.o upnp_renderer.o webserver.o output_gstreamer.o xmlescape.o /usr/lib/libixml.so.2 -pthread -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lxml2 -lglib-2.0 -lupnp

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .