Jump to content
  • Advertisement
Sign in to follow this  
teslaa66

OpenGL possible to re-install windows.h?

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
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 identifier
main.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 this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!