GNOME Bugzilla – Bug 669045
gstreamermm-0.10.10 does not build on Windows because of __declspec(dllimport) attributes
Last modified: 2017-04-21 14:00:33 UTC
While trying to compile gstreamermm-0.10.10 using MinGW32, I was getting several errors related to declarations/definitions of constants in gstclock.h. Namely, gcc was complaining that: "external linkage is required because CLOCK_TIME_NONE has attribute 'dllimport'"... The same error was reported for all the following 4 constants which had "GLIBMM_API" in their signature. After searching the interwebs I found out that, indeed, "__declspec(dllimport)" and "static" are incompatible with each other (internal x external linkage), so I tried to fiddle with the code, and the only way that I could make the code build was to remove BOTH static and GLIBMM_API qualifiers from the signatures. Thus, they became something like this: "const ClockTime CLOCK_TIME_NONE = GST_CLOCK_TIME_NONE;" I then built successfully gstreamermm, AND was able to run some test programs that I wrote - with simple pipelines (decodebin, playbin, etc), so I GUESS I didn't break anything serious... Can someone confirm this bug? I'd be happy to upload a patch to gstreamer/src/clock.hg in case this is really a bug...
Created attachment 208008 [details] [review] gstreamermm: Patch to allow the build to succeed for MinGW32. Sorry about that. This was an early attempt at defining GStreamer equivalent clock constants in gstreamermm. I think this patch should fix things. I've created a new release (0.10.10.1) including these changes: http://ftp.gnome.org/pub/GNOME/sources/gstreamermm/0.10/ Could you try with that release and see if it fixes things?
Let's assume that the fix worked.