Take the 2-minute tour ×

I am getting a parameter name omitted error with this code

#include <GL3/gl3w.h>

void f(int near, int far) {


int main() {
    return 0;

From this question I suspected gl3w included WinDef.h but I am not able to find it included in the sources. What is the source of this problem and how can it be corrected?

share|improve this question
That question's accepted answer seems reasonable. If you're looking for the story, there used to be near pointers and far pointers, which are now obsolete. –  chris Oct 20 '12 at 15:31

2 Answers 2

up vote 2 down vote accepted

near and far were used to indicate types of pointers, and are likely to be defined as

#define near
#define far

Which leaves you with

void f(int , int )


Which is an invalid function definition in C. (arguments must have a name). either undefine them (#undef) or change the argument names. Note that this is not a problem in function declaration (i.e. void foo(int, int); - as in header files) only in function definitions.

Specifically, gl3w.h contains gl3.h which contains windows.h

share|improve this answer

To be sure the problem do not come from WinDef.h, you can try to undefine near and far, to see if it works.

#undef far
#undef near

The error seems to match with the behavior of this definitions. Is near and far are defined as empty macros, your parameters won't have identifiers.

share|improve this answer

Your Answer


