Sign in to follow this  

EGLInterface error C2078: too many initializers

This topic is 4421 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Edit: This is C++ code High everybody. I'm creating an EGLInterface class to encapsulate all of my EGL stuff. But, I'm having a little bit of trouble. Inside my EGLInterface.h header, I create my EGLint configAttribs[] and in my EGLInterface.cpp, I set
const			 EGLint			 configAttribs	= {
		EGL_ALPHA_SIZE,	0,
		EGL_RED_SIZE,	8,
		EGL_GREEN_SIZE,	8,
		EGL_BLUE_SIZE,	8,
		EGL_DEPTH_SIZE,	24,
		EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
		EGL_NONE
		};	




Whenever I compile, I get
errorC2078: too many initializers
Here are the relevant chunks "Cut and Pasted" from my header and source files. Header:

class EGLInterface
{
.
.
.
private:
     EGLint             configAttribs[25]; /*I know this is bigger than it needs to be, but it wouldn't let me define it empty, and whenever I set size equal to 13, it still threw the error C2078.  I just set it to this size to ensure that it was large enough
*/

}




Source
#include "EGLInterface.h"

.
.
.
const			 EGLint			 configAttribs	= {
		EGL_ALPHA_SIZE,	0,
		EGL_RED_SIZE,	8,
		EGL_GREEN_SIZE,	8,
		EGL_BLUE_SIZE,	8,
		EGL_DEPTH_SIZE,	24,
		EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
		EGL_NONE
		};	
.
.
.




any help would be greatly appreciated. ...Also, I sporadically get an error
C:\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Include\emulator\GLES\egltypes.h(38): Could not find the file e32def.h.




but, if I compile again (without any changes whatsoever) it magically disappears. Anybody know what causes this?

Share this post


Link to post
Share on other sites
*jaw drops* it's official. I'm retarded. ...Maybe it's a phase of the Moon or something. Earlier today I sat around and stared for 30 minutes at code that wasn't working because I had forgotten to include the header file that I had created for the class (had all of my other includes in it).

Share this post


Link to post
Share on other sites

This topic is 4421 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this