GNOME Bugzilla – Bug 675415
build: fix librfb linking on win32
Last modified: 2012-05-07 23:07:44 UTC
libtool: link: i686-w64-mingw32-gcc -shared .libs/libgstrfbsrc.dll.def .libs/libgstrfbsrc_la-gstrfbsrc.o -Wl,--whole-archive ./.libs/librfb.a -Wl,--no-whole-archive -L/usr/i686-w64-mingw32/sys-root/mingw/lib -lgstbase-0.10 -lgstreamer-0.10 -lxml2 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -mms-bitfields -mms-bitfields -O2 -o .libs/libgstrfbsrc.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgstrfbsrc.dll.a Creating library file: .libs/libgstrfbsrc.dll.a ./.libs/librfb.a(librfb_la-rfbdecoder.o): In function `rfb_decoder_read': /home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:164: undefined reference to `_imp__recv@16' ./.libs/librfb.a(librfb_la-rfbdecoder.o): In function `rfb_decoder_connect_tcp': /home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:112: undefined reference to `_imp__socket@12' /home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:119: undefined reference to `_imp__htons@4' /home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:123: undefined reference to `_imp__inet_addr@4' /home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:125: undefined reference to `_imp__connect@12' It needs -lws2_32 which is already in $(WIN32_LIBS)
Created attachment 213416 [details] [review] build: fix librfb linking on win32
Doesn't it need at least WSAStartup/WSACleanup bits too then in order to actually work?
(In reply to comment #2) > Doesn't it need at least WSAStartup/WSACleanup bits too then in order to > actually work? Sorry, no idea, I just tried to build atm, I use other modules.
commit 9503daa56ab5a33bad27bcb0e5f3bc492e3963cb Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Mon May 7 23:57:08 2012 +0100 rfbsrc: call WSAStartup/Cleanup on win32 If we link against libwinsock2, we should probably call Startup/Cleanup as well. https://bugzilla.gnome.org/show_bug.cgi?id=675415 commit 2f20ec731202b72a03c5013239ab122fa2f22337 Author: Marc-André Lureau <marcandre.lureau@gmail.com> Date: Thu May 3 23:42:13 2012 +0200 rfbsrc: fix librfb linking on win32 libtool: link: i686-w64-mingw32-gcc -shared .libs/libgstrfbsrc.dll.def .libs/libgstrfbsrc_la-gstrfbsrc.o -Wl,--whole-archive ./.libs/librfb.a -Wl,--no-whole-archive -L/usr/i686-w64-mingw32/sys-root/mingw/lib -lgstbase-0.10 -lgstreamer-0.10 -lxml2 -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -mms-bitfields -mms-bitfields -O2 -o .libs/libgstrfbsrc.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgstrfbsrc.dll.a Creating library file: .libs/libgstrfbsrc.dll.a ./.libs/librfb.a(librfb_la-rfbdecoder.o): In function `rfb_decoder_read': /home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:164: undefined reference to `_imp__recv@16' ./.libs/librfb.a(librfb_la-rfbdecoder.o): In function `rfb_decoder_connect_tcp': /home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:112: undefined reference to `_imp__socket@12' /home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:119: undefined reference to `_imp__htons@4' /home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:123: undefined reference to `_imp__inet_addr@4' /home/elmarco/pkg/rhel/mingw-gstreamer-plugins-bad-free/gst-plugins-bad-0.10.23/build_win32/gst/librfb/../../../gst/librfb/rfbdecoder.c:125: undefined reference to `_imp__connect@12' It needs -lws2_32 which is already in $(WINSOCK2_LIBS) https://bugzilla.gnome.org/show_bug.cgi?id=675415
Comment on attachment 213416 [details] [review] build: fix librfb linking on win32 pushed with s/WIN32_LIBS/WINSOCK2_LIBS/ , which I changed recently.