Where is EGL_NO_IMAGE_KHR defined?

In http://www.khronos.org/registry/egl/api/eglext.h
EGL_NO_IMAGE_KHR is an external const: “extern const EGLImageKHR EGL_NO_IMAGE_KHR;”

If I want to use EGL_NO_IMAGE_KHR in my code, to check the return value of eglCreateImageKHR(…), how would I do it?

This is a bug in the eglext.h file. The line should be changed to:

#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0)

This will be done in a (hopefully soon) update to the eglext.h on the khronos website, but for now you can just change the local copy of your eglext.h file.

eglext.h was updated to #define EGL_NO_IMAGE_KHR several weeks ago.