# OpenGL possible to re-install windows.h?

This topic is 3542 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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
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.


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 ******

##### Share on other sites
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 to avoid name space pollution, but Win32's 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.

##### Share on other sites
This might help: Using the Windows Headers

##### Share on other sites
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.

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

##### Share on other sites
sorted thanks just copied the include directory over from my other computer and it sorted it

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 14
• 12
• 9
• 12
• 37
• ### Forum Statistics

• Total Topics
631425
• Total Posts
3000015
×