[linux] Re: Probleempje met make/gcc
Paul Slootman
paul+nospam op wurtel.net
Do Nov 17 15:54:50 CET 2011
On Thu 17 Nov 2011, Robin van Leeuwen wrote:
> libtool: link: gcc -pthread -I/usr/include/glib-2.0
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -pthread
> -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
> -I/usr/include/libzxr -I/usr/include/libxml2 -I/opt/zentific/include
> -DMODPATH=\"/opt/zentific/zensched/\" -DPREFIX=\"/opt/zentific/\"
> -Wall -Wextra -pipe -ggdb -Wall -rdynamic -o zensched zensched-zcron.o
> zensched-jobmodules.o zensched-utility.o zensched-zensched.o
> zensched-jobcommon.o zensched-zconf.o -pthread -pthread
> -L/opt/zentific/zrpc /usr/lib/x86_64-linux-gnu/libgobject-2.0.so -lssl
> /usr/lib/libzshare.so /usr/lib/libzxr.so
> /usr/lib/x86_64-linux-gnu/libgthread-2.0.so -lrt
> /usr/lib/x86_64-linux-gnu/libglib-2.0.so
> /opt/zentific/zrpc/libztype.so /opt/zentific/zrpc/libzcore.so -ldl
> -lpthread -pthread
> /opt/zentific/zrpc/libzcore.so: undefined reference to `zxr_http_get_header'
> /opt/zentific/zrpc/libzcore.so: undefined reference to
> `zxr_call_get_servlet_name'
> /opt/zentific/zrpc/libzcore.so: undefined reference to `zxr_call_get_method'
> /opt/zentific/zrpc/libzcore.so: undefined reference to
> `zxr_call_get_method_full'
> /opt/zentific/zrpc/libzcore.so: undefined reference to `zxr_http_get_resource'
> /opt/zentific/zrpc/libzcore.so: undefined reference to `zxr_call_set_error'
> collect2: ld returned 1 exit status
> make[1]: *** [zensched] Error 1
> make[1]: Leaving directory `/root/zentific/zensched/src'
> make: *** [all] Error 2
> -------------
>
> Nu schijnt de undefined reference melding te komen als er een library
> niet word meegelinked, maar zoals boven te zien is
> worden de "-lzcore" en " -L/opt/zentific/zrpc" meegegeven. Nu heb ik
Volgorde is belangrijk.
Als libzcore.so iets uit -lxyz nodig heeft, dan moet die -lxyz wel
na libzcore.so vermeld worden op de command line.
> --- c/p ---
> grep "zxr_http_get_header" /usr/include/libzxr/*
> /usr/include/libzxr/zxr-http.h:const char*
> zxr_http_get_header(zxr_http* http, const char* name);
> ------------
Dus /usr/lib/libzxr.so na de -lzcore opgeven, niet ervoor.
Paul
More information about the Linux
mailing list