Compiling...
main.cpp
vc98\include\winbase.h(6257) : error C2146: syntax error : missing ';' before identifier 'SetThreadToken'
vc98\include\winbase.h(6257) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
possible to re-install windows.h?
Is it possible to re-install windows.h with all or most of its components? only reason i say this is because any program i include windows.h in i have this error
i recently installed
GLAUX.LIB, OPENGL32.LIB, glut32.lib, glu32.lib
glu32.dll, glut32.dll, glut.dll, opengl32.dll
GLU.H, GL.H, GLAUX.H, GL/GL.H, GL/GLAUX.H, GL/glext.h, GL/GLU.H, GL/glu_.h, GL/glut.h
****Please note that my first include is windows.h and if i do not include this my code compiles and runs fine ******
Quote:Original post by teslaa66
****Please note that my first include is windows.h and if i do not include this my code compiles and runs fine ******
There is nothing wrong with your Windows files. However, you are using GLUT, which happens to define Win32 constructs to avoid using windows.h. Here is their comment in the GLUT header file:
Quote:
/* GLUT 3.7 now tries to avoid including <windows.h>
to avoid name space pollution, but Win32's <GL/gl.h>
needs APIENTRY and WINGDIAPI defined properly. */
Can you please explain why you need to include "windows.h" if your code works fine without it? If you must absolutely have it, you might need to mess around with GLUT's header file or change the include order of your program.
If you do want to try to change the GLUT header, I'd try making # if 0 into # if 1 and only use that header file on Windows.
i mean on the programs i dont include windows.h they compile and run fine. With my current project though i include windows so that i can delcare a BYTE and also a POINT.
Literally the only time i get an error is when i include windows.h and this happens to even
works fine without but with it the compiler doesnt work
BYTE x, y, z, padding;POINT pointCursorPos; md2loader.h(76) : error C2065: 'BYTE' : undeclared identifiermain.cpp(23) : error C2501: 'POINT' : missing storage-class or type specifiers
Literally the only time i get an error is when i include windows.h and this happens to even
#include <windows.h>#include <iostream>using namespace std;int main(){ cout << "hello"; return 0;}
works fine without but with it the compiler doesnt work
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement