GNOME Bugzilla – Bug 492306
compilation errors with MinGW
Last modified: 2007-11-01 13:30:34 UTC
I have the following errors with MinGW when compiling gst-plugins-base (ogg, vorbis, theora and pango plugins are built. I couldn't test libvisual plugin as the home site is down, but last time i tried, there was no problem): 1) fft plugin: with MinGW, int16_t and int32_t are defined in stdint.h. I included it in a _WIN32 guard (it seems that glib is not used (no g* types used), so I don't use G_OS_WIN32) I don't know if it will compile with ms vc. 2) rtsp plugin: pipe is not declared on Windows, while _pipe is. I use the diff: http://webcvs.freedesktop.org/gstreamer/gstreamer/libs/gst/net/gstnetclientclock.c?r1=1.22&r2=1.23 to do the modification. It compiles, but I don't know if it works. 3) sdp plugin: getaddrinfo and al are defined in libws2_32.a, so we must link angainst that lib. also, getaddrinfo is declared in ws2tcpip.h. I added G_OS_WIN32 but I had to change the location of the inclusion of glib.h 4) addstream test: sleep is not a Windows function. We can use Sleep, which takes the number of milliseconds as parameter. I defined WIN32_LEAN_AND_MEAN because it forbids the inclusion of specific (and useless in that case) header files. Hence the compilation is a bit faster. the patch is below
Created attachment 98300 [details] [review] patch for gst-plugins-base
Thanks for the patch. The fft lib should just include our own _stdint.h from the top-level directory, which should take care of everything. Instead of sleep(), we should just use GLib's g_usleep(). Should all be fixed in CVS now, please double-check: 2007-11-01 Tim-Philipp Müller <tim at centricular dot net> Patch by: Vincent Torri <vtorri at univ-evry dot fr> * gst-libs/gst/fft/kiss_fft_s16.h: (KISS_FFT_S16_MALLOC): * gst-libs/gst/fft/kiss_fft_s32.h: (KISS_FFT_S32_MALLOC): Include our own _stdint.h instead of sys/types.h, makes MingW happy (#492306). * gst-libs/gst/rtsp/gstrtspconnection.c: (gst_rtsp_connection_create): Use _pipe directly, GLib doesn't have a pipe() macro any longer (it disappeared in GLib 2.14.0) (#492306). * gst-libs/gst/sdp/Makefile.am: * gst-libs/gst/sdp/gstsdpmessage.c: Fix includes and LIBS for win32/Mingw (#492306). * tests/examples/dynamic/addstream.c (pause_play_stream): Use more portable g_usleep() instead of sleep() (#492306).