4

I'm trying to compile xkbcomp (from xorg App) but I got the following errors :

warning: libxcb.so.1, needed by /lib/libX11.so, not found (try using -rpath or -rpath-link)
/lib/libX11.so: undefined reference to `xcb_connection_has_error'
/lib/libX11.so: undefined reference to `xcb_poll_for_reply'
/lib/libX11.so: undefined reference to `xcb_get_maximum_request_length'
/lib/libX11.so: undefined reference to `xcb_get_file_descriptor'
/lib/libX11.so: undefined reference to `xcb_connect'
/lib/libX11.so: undefined reference to `xcb_wait_for_reply'
/lib/libX11.so: undefined reference to `xcb_get_setup'
/lib/libX11.so: undefined reference to `xcb_wait_for_event'
/lib/libX11.so: undefined reference to `xcb_poll_for_event'
/lib/libX11.so: undefined reference to `xcb_parse_display'
/lib/libX11.so: undefined reference to `xcb_generate_id'
/lib/libX11.so: undefined reference to `xcb_disconnect'
/lib/libX11.so: undefined reference to `xcb_take_socket'
/lib/libX11.so: undefined reference to `xcb_writev'
/lib/libX11.so: undefined reference to `xcb_connect_to_display_with_auth_info'

Note: libX11 and libxcb are successfully been compiled (using autotools) and I got all my ".so" shared libraries and header files. But the problem still existing.

How can I solve that??

4

2 回答 2

9

我已经解决了这个问题,我只需要在我的 LDFLAGS 中添加“-lxcb”。现在,它工作正常。谢谢——</p>

于 2013-03-13T09:36:46.550 回答
0

在 Linux 中,使用 GCC,您可以使用标志

gcc input.c -o output -I/usr/lib/X11R6 -lX11
于 2013-03-12T16:01:09.040 回答