I was compiling the code to create an opengl context using WGL. I was following the Creating_an_OpenGL_Context_(WGL) tutorial of khronos but it gives me an error which reads:
window.cpp:8:14: error: 'int WinMain' redeclared as different kind of symbol
int WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd )
^~~~
In file included from c:\mingw\include\windows.h:44:0,
from window.cpp:1:
c:\mingw\include\winbase.h:1263:14: note: previous declaration 'int WinMain(HINSTANCE, HINSTANCE, LPSTR, int)'
int APIENTRY WinMain (HINSTANCE, HINSTANCE, LPSTR, int);
^~~~~~~
window.cpp:8:14: error: '__in' was not declared in this scope
int WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd )
^~~~
window.cpp:8:40: error: '__in_opt' was not declared in this scope
int WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd )
^~~~~~~~
window.cpp:8:74: error: '__in_opt' was not declared in this scope
int WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd )
^~~~~~~~
window.cpp:8:100: error: '__in' was not declared in this scope
int WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd )
I tried to solve it but couldn’t what can I do to fix it?