View Full Version : undefined identifier WINGDIAPI

02-22-2001, 12:52 AM
i have the following error:

undefined identifier WINGDIAPI
WINGDIAPI void APIENTRY...(blah blah)

in the file 'gl.h'. I am trying to port a project from the Mac to the PC and this is one of the few errors left. is it anything to do with the fact i am using a 'C++ Console App' instead of a 'Win32 App' for the type of project?

02-22-2001, 04:37 AM
Yup. ;]

02-22-2001, 05:55 AM
#include <windows.h> before gl.h

02-22-2001, 01:52 PM
Hey... I'm getting a compile error myself. Here's the code and compile error.

#include <iostream.h>

void main()
void CompileIssueIncrement()
cout << "Number of times people ask simple compile issues "
<< "without searching the form first is " << n++;

The error I'm getting is

--------------------Configuration: CompileIssue - Win32 Release--------------------
C:\Projects\BCompileIssue\CompileIssue.cpp(10) : error C2065: 'n' : undeclared identifier
Error executing cl.exe.

CompileIssue.exe - 1 error(s), 0 warning(s)

Sorry... couldn't help myself. http://www.opengl.org/discussion_boards/ubb/smile.gif

02-22-2001, 06:16 PM

after int main()
int n=0;
you have to declare a variable like "n" before you use it

in your case increment it "n++"

02-22-2001, 06:56 PM
I _really_ hope that you noticed he was joking.



Actually, I think that even if you declared n, there would be a run time overflow. http://www.opengl.org/discussion_boards/ubb/smile.gif


02-22-2001, 08:15 PM
Yes I thought he was.....
but you never know around here

A stupid question is one left unasked

02-23-2001, 05:44 AM
Heheh, yeah. I was definitely joking. It seems that the WINGDIAPI question gets asked 3-4 times every week, and it really is just another form of the "undefined identifier" error. I would like to think that anyone who is using OpenGL has at least enough sense to figure this one out, or at the very least search the board for WINGDIAPI first.

I don't mind helping people with compile issues (and I have many times), but when you have to answer the SAME question all the time...