#include <GLES3/gl3.h> causes compiler error in VS2015 “OpenGLES 2 Application (Android, iOS, Windows Universal)” project RRS feed

  • Question

  • Probably it is not a proper category for this post, because it mostly relates to Android SDK, please correct it, if needed.

    I did some changes to the application based on “OpenGLES 2 Application (Android, iOS, Windows Universal)” project in VS2015 update 3.

    In particular, I added the following include to Android Native Activity project:

    #include <GLES3/gl3.h>

    and got the following compiler error in Release/ARM configuration:

    1>C:\ProgramData\Microsoft\AndroidNDK64\android-ndk-r11c\platforms\android-19\arch-arm\usr\include\GLES2/gl2.h(572,37): error : conflicting types for 'glShaderSource'
    1>  GL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length);
    1>                                      ^
    1>  C:\ProgramData\Microsoft\AndroidNDK64\android-ndk-r11c\platforms\android-19\arch-arm\usr\include\GLES3\gl3.h(905,39) :  note: previous declaration is here
    1>  GL_APICALL void           GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length);
    1>                                        ^

    Release/ARM64 configuration compiles successfully, with no errors.

    I do not know what version of Android SDK I have, but at least the OpenGL includes are in android-ndk-r11c\platforms\android-19 folder.

    Tuesday, October 11, 2016 5:09 PM


All replies

  • The Developing Universal Windows appsforum is for developers to discuss writing their own UWP apps. UWP apps do not run on Android.

    If your question is about Visual Studio support for Android development then there may be an MSDN forum for it, but I'm not sure which one. Somebody on the Where is the forum for? forum may have an idea.

    Tuesday, October 11, 2016 8:56 PM
  • Might try the Xamarin forums here.




    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    • Proposed as answer by Mike Laughlin Tuesday, October 11, 2016 9:37 PM
    Tuesday, October 11, 2016 9:27 PM
  • I simply changed Target API level to android21 and it compiled successfully.
    • Marked as answer by ShamanSoft Friday, October 14, 2016 6:06 PM
    Friday, October 14, 2016 6:06 PM