GstGlApi compile error

Gordon Nickel gordon.nickel at
Thu Oct 1 11:06:00 PDT 2015

Ah - I see what happened. I had installed 1.6.0 on top of 1.4.5, and it looks like some of the header files didn't get updated (moved locations between versions is my guess). I did a clean install of 1.6.0 and I see the change now.

Thanks for the quick responses, much appreciated!

From: Matthew Waters [mailto:ystreet00 at]
Sent: Wednesday, September 30, 2015 7:59 PM
To: Gordon Nickel <gordon.nickel at>; gstreamer-devel at
Subject: Re: RE: GstGlApi compile error

On 01/10/15 06:45, Gordon Nickel wrote:

Thanks for the tip Matt. I compiled with the preprocessor output, and didn't notice anything glaring in the output file (the macros in question looks like they were parsed correctly).

To eliminate any project-specific setup issues, I started a brand new Win32 project in VS2013 and VS2010, included <gst/gl/gl.h> (along with relevant incude paths), and it produced identical syntax errors. If I mouse over the GST_GL_EXT_FUNCTION (which has the red syntax-error squiggles underneath it), VS shows: "Error: a calling convention may not be followed by a nested declarator. " Investigating that further, I changed the following in gstglapi.h:

#define GST_GL_EXT_FUNCTION(ret, name, args) \
         ret GSTGLAPI (*name) args;


#define GST_GL_EXT_FUNCTION(ret, name, args) \
         ret GSTGLAPI name args;

Which was able to build and run using gl elements in gstreamer (glupload, glfilterblur, glimagesink). GSTGLAPI eventually points to _stdcall, so I'm guessing Visual Studio's compiler doesn't like the pointer syntax for __stdcall?

Hmm, it looks like that's already been fixed in 1.6 which you may want to upgrade too.  See It's also fixed in the 1.4 branch but not in a stable release there yet

- Gordon

From: Matthew Waters [mailto:ystreet00 at]
Sent: Wednesday, September 30, 2015 3:09 AM
To: Gordon Nickel <gordon.nickel at><mailto:gordon.nickel at>; gstreamer-devel at<mailto:gstreamer-devel at>
Subject: Re: GstGlApi compile error

On 30/09/15 10:38, Gordon Nickel wrote:


I'm attempting to use the gl api for playback in a C++ app, and getting a wall of compile errors when I include gst/gl/gl.h using 1.6.0 in Windows with VS2013. The error is:

1>c:\gstreamer\1.0\x86\include\gstreamer-1.0\gst\gl\glprototypes\base.h(51): error C2059: syntax error : '('
1>c:\gstreamer\1.0\x86\include\gstreamer-1.0\gst\gl\glprototypes\base.h(51): error C2238: unexpected token(s) preceding ';'

Which points to this line (and every other line using GST_GL_EXT_FUNCTION):

GST_GL_EXT_FUNCTION (void, BindTexture,
                     (GLenum target, GLuint texture))

I've double-checked all the include paths - is there something I'm missing?

Nothing comes to mind off the top of my head.  A simple c++ application that just performs #include <gst/gl/gl.h> works with both g++ and gcc fine so I'm not sure what the problem could be without seeing code/more errors.  Of course the real error could be somewhere else that's confusing the preprocessor into generating bad code. You could try examining the preprocessor's output see



Gordon Nickel
Lead Developer

1624 NW Johnson Street
Portland, OR 97209, USA

503.226.1944 main
503.226.1283 fax

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list