GstGlApi compile error

Matthew Waters ystreet00 at gmail.com
Wed Sep 30 19:59:28 PDT 2015


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;
>
>  
>
> To:
>
>  
>
> #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 http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/gstglapi.h#n101.
It's also fixed in the 1.4 branch but not in a stable release there yet
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?h=1.4&id=c3ca2f04fe5131362f46ae3fdd12ebe5b3b55773

> - Gordon
>
>  
>
> *From:*Matthew Waters [mailto:ystreet00 at gmail.com]
> *Sent:* Wednesday, September 30, 2015 3:09 AM
> *To:* Gordon Nickel <gordon.nickel at downstream.com>;
> gstreamer-devel at lists.freedesktop.org
> *Subject:* Re: GstGlApi compile error
>
>  
>
> On 30/09/15 10:38, Gordon Nickel wrote:
>
>     Hi,
>
>      
>
>     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
> https://msdn.microsoft.com/en-us/library/8z9z0bx6.aspx.
>
> Cheers
> -Matt
>
>
>     Thanks!
>
>      
>
>     *Gordon Nickel*
>     Lead Developer
>
>     *downstream*
>     1624 NW Johnson Street
>     Portland, OR 97209, USA
>
>     503.226.1944 main
>     503.226.1283 fax
>
>      
>
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151001/0ceee9a7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151001/0ceee9a7/attachment.sig>


More information about the gstreamer-devel mailing list