[Spice-devel] [spice-gtk] mingw: Fix link errors
Marc-André Lureau
mlureau at redhat.com
Fri Dec 21 12:04:46 PST 2012
Hi
----- Mensaje original -----
> Without this patch build fails with:
>
> CCLD libspice-client-glib-2.0.la
> .libs/spice-channel.o: In function `spice_channel_coroutine':
> /home/teuf/redhat/spice-gtk/gtk/spice-channel.c:2287: undefined
> reference to `_imp__setsockopt at 20'
> .libs/channel-display.o: In function `create_compatible_dc':
> /home/teuf/redhat/spice-gtk/gtk/channel-display.c:672: undefined
> reference to `_imp__CreateCompatibleDC at 4'
> ../spice-common/common/.libs/libspice-common.a(canvas_utils.o): In
> function `release_data':
> /home/teuf/redhat/spice-gtk/spice-common/common/canvas_utils.c:41:
> undefined reference to `_imp__DeleteObject at 4'
> ../spice-common/common/.libs/libspice-common.a(canvas_utils.o): In
> function `surface_create':
> /home/teuf/redhat/spice-gtk/spice-common/common/canvas_utils.c:192:
> undefined reference to `_imp__CreateDIBSection at 24'
> /home/teuf/redhat/spice-gtk/spice-common/common/canvas_utils.c:208:
> undefined reference to `_imp__DeleteObject at 4'
> ../spice-common/common/.libs/libspice-common.a(ssl_verify.o): In
> function `inet_aton':
> /home/teuf/redhat/spice-gtk/spice-common/common/ssl_verify.c:38:
> undefined reference to `_imp__inet_addr at 4'
> ../spice-common/common/.libs/libspice-common.a(ssl_verify.o): In
> function `verify_hostname':
> /home/teuf/redhat/spice-gtk/spice-common/common/ssl_verify.c:216:
> undefined reference to `_imp__inet_ntoa at 4'
> collect2: error: ld returned 1 exit status
> ---
> gtk/Makefile.am | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/gtk/Makefile.am b/gtk/Makefile.am
> index 5b219a7..176cf20 100644
> --- a/gtk/Makefile.am
> +++ b/gtk/Makefile.am
> @@ -345,6 +345,7 @@ if WITH_USBREDIR
> libspice_client_glib_2_0_la_SOURCES += \
> $(WIN_USB_FILES)
> endif
> +libspice_client_glib_2_0_la_LIBADD += -lws2_32 -lgdi32
> endif
>
> displaysrc = \
> --
> 1.8.0.2
>
Interesting that it doesn't fail with f17 mingw64. Since we call those libraries directly, ack.
More information about the Spice-devel
mailing list