linker error: não foi possível ler os símbolos: Operação inválida

1

Eu estou tentando compilar GMediaRender no Ubuntu 12.04. Recebi um erro durante o 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

Eu tentei adicionar -lixml2 e -L/usr/lib/libixml.so.2 , mas entendi:

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

por favor me ajude a sair daqui - eu sou um novato

    
por laplasz 08.02.2014 / 16:42

1 resposta

2

finalmente encontrei a solução para esse problema nesta página , então adicionei /usr/lib/libixml.so.2 explicitamente aos parâmetros do gcc:

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

    
por 15.02.2014 / 16:21

Tags