aerlfredith
aerlfredith

Reputation: 1131

OpenGL ES compile errors

When trying to write these functions in eclipse with android NDK errors given that there are invalid arguments and such:

m_Display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
m_Surface = eglCreateWindowSurface(m_Display, lConfig,
        m_Application->window, NULL);

The errors:

  1. Invalid arguments ' Candidates are: void * eglGetDisplay(?)
  2. Type 'EGL_DEFAULT_DISPLAY' could not be resolved
  3. Invalid arguments ' Candidates are: void * eglCreateWindowSurface(void *, void *, ?, const int *)

The tooltip eclipse gives when hovering over these functions shows questionmarks as input variables. I think eclipse isn't finding some code it should be including but I don't know how to fix it.

Upvotes: 0

Views: 1135

Answers (1)

Moonkid
Moonkid

Reputation: 916

To fix this go to your projects properties and go to the "C/C++ General->Paths and Symbols" page, under the "Symbols" tab click on GNU C and then the "Add" button and put

__ANDROID__

in the NAME field (value leave blank) and click OK. You can do the same for GNU C++.

Upvotes: 1

Related Questions