[Spice-devel] [help]there's an error during i compile spice-gtk code

Christophe Fergeau cfergeau at redhat.com
Fri Sep 25 01:45:02 PDT 2015


Hey,

On Fri, Sep 25, 2015 at 02:10:28PM +0800, hongzhen_luo at sina.com wrote:
> I added a new method at usb-device-manager then call it at
> usb-device-widget , but when I compile the project , a problem was
> appeared .......
> Please help me check this LINK problem , thank you  it looks like
> cannot find   libspice-client-gtk-3.0.la ?CCLD
> libspice-client-glib-2.0.la  CC       spice-gtk-session.lo
>   CC       spice-widget.lo
>   CC       vncdisplaykeymap.lo
>   CC       spice-grabsequence.lo
>   CC       desktop-integration.lo
>   CC       usb-device-widget.lo
> usb-device-widget.c: In function 'device_added_cb':
> usb-device-widget.c:507:11: warning: unused variable 'state' [-Wunused-variable]
>      guint state = spice_reget_usb_state(device);
>            ^
>   CC       spice-widget-cairo.lo
>   CC       spice-widget-enums.lo
>   CCLD     libspice-client-gtk-3.0.la
> .libs/usb-device-widget.o: In function `device_added_cb':
> /root/.netbeans/remote/172.26.80.71/xhx-20150710tvd-Windows-x86/F/1111/spice-gtk-0.28/gtk/usb-device-widget.c:507: undefined reference to `spice_reget_usb_state'
> collect2: error: ld returned 1 exit status

usb-device-manager.c is part of libspice-client-glib-2.0.la while
usb-device-widget.c will be built as part of libspice-client-gtk-3.0.la.
Public symbols are hidden by default (ie spice_reget_usb_state() will
not be available outside of libspice-client-glib-2.0.la), which is
causing the link error you are seeing. You can run
'make update-symbol-files' to regenerate src/spice-glib-sym-file (or
edit this file manually)so that your new symbol is exported and can be
used by libspice-client-gtk-3.0.la.

Can you give more details about the issue you are trying to fix with
this new spice_reget_usb_state() method?

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150925/c843c525/attachment.sig>


More information about the Spice-devel mailing list