GNOME Bugzilla – Bug 529910
pygstiterator.c doesn't compile in Windows using MinGW
Last modified: 2009-09-10 08:28:47 UTC
I am trying to compile gst-plugins in Windows Vista using MinGW and I get the following error: if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -Ic:\Python25/include/python2.5 -Ic:/dependencies/release/include/pygtk-2.0 -Ic:/dependencies/release/include/glib-2.0 -Ic:/dependencies/release/lib/glib-2.0/include -Ic:/dependencies/release/include/gstreamer-0.10 -Ic:/dependencies/release/include/glib-2.0 -Ic:/dependencies/release/lib/glib-2.0/include -Ic:/dependencies/release/include/libxml2 -Wall -fno-strict-aliasing -I/build/release/include -I/build/release/include/python2.5 -I/mingw/include -mms-bitfields -include mingwstuff.h -MT _gst_la-pygstiterator.lo -MD -MP -MF ".deps/_gst_la-pygstiterator.Tpo" -c -o _gst_la-pygstiterator.lo `test -f 'pygstiterator.c' || echo './'`pygstiterator.c; \ then mv -f ".deps/_gst_la-pygstiterator.Tpo" ".deps/_gst_la-pygstiterator.Plo"; else rm -f ".deps/_gst_la-pygstiterator.Tpo"; exit 1; fi gcc -DHAVE_CONFIG_H -I. -I. -I.. -Ic:Python25/include/python2.5 -Ic:/dependencies/release/include/pygtk-2.0 -Ic:/dependencies/release/include/glib-2.0 -Ic:/dependencies/release/lib/glib-2.0/include -Ic:/dependencies/release/include/gstreamer-0.10 -Ic:/dependencies/release/include/glib-2.0 -Ic:/dependencies/release/lib/glib-2.0/include -Ic:/dependencies/release/include/libxml2 -Wall -fno-strict-aliasing -I/build/release/include -I/build/release/include/python2.5 -I/mingw/include -mms-bitfields -include mingwstuff.h -MT _gst_la-pygstiterator.lo -MD -MP -MF .deps/_gst_la-pygstiterator.Tpo -c pygstiterator.c -DDLL_EXPORT -DPIC -o .libs/_gst_la-pygstiterator.o pygstiterator.c:137: error: initializer element is not constant pygstiterator.c:137: error: (near initialization for `PyGstIterator_Type.tp_iter') pygstiterator.c: In function `pygst_iterator_new': pygstiterator.c:149: warning: long unsigned int format, GType arg (arg 10) make[3]: *** [_gst_la-pygstiterator.lo] Error 1 make[3]: Leaving directory `/c/dev/build-release/gst-python-0.10.11/gst' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/c/dev/build-release/gst-python-0.10.11/gst' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/c/dev/build-release/gst-python-0.10.11' make: *** [all] Error 2 make failed in /c/dev/build-release/gst-python-0.10.11
I think a possible solution can be find here: http://lua-users.org/wiki/LunaticPython
Created attachment 109989 [details] [review] Proposed fix Move initialization of PyGstIterator_Type.tp_iter to gstmodule.c to avoid mingw32 compiler error.
Add Alessandro as CC
Jesus, does it still work if you move it further down in gstmodule.c, like just before the call to pygst_register_classes() ? That would make it cleaner.
Closing as no required information was provided.