Windows.h for OPENGL

I now have everything I need to compile OPENGL functions but I get an error stating it cannot find windows.h. That’s because I don’t have Windows.h. I’ve checked my son’s computer. He doesn’t haev it. I hae asked some friends. They don’t hae it. How do I get a copy of window.h for GL, GLU, and GLUT for an early version of Windows 98? Thanks, Hurle

This has nothing to do with OpenGL, but I’ll answer it anyways. What compiler are you using? If you don’t have windows.h, then it probably isn’t a windows compiler, and the linker won’t be able to produce Windows programs. You can get a copy of windows.h with the MinGW compiler (www.mingw.org). MinGW is a windows port of the GNU compiler system. Try to compile a “Hello World” program before trying to use OpenGL.

Originally posted by Aaron:
[b]This has nothing to do with OpenGL, but I’ll answer it anyways. What compiler are you using? If you don’t have windows.h, then it probably isn’t a windows compiler, and the linker won’t be able to produce Windows programs. You can get a copy of windows.h with the MinGW compiler (www.mingw.org). MinGW is a windows port of the GNU compiler system. Try to compile a “Hello World” program before trying to use OpenGL.

[/b]

I’m using a GNU C and C++ compiler running under windows 98 DOS. I have to work in a DOS window. The editor is rhide. I don’t know much about setting up Windows and DOS. I thought that DOS was part of Windows. Anyways, I can compile and run C and C++ programs but my Opengl with GLUT need windows.h. Do I have the wrong glut?

You cannot use OpenGL in DOS programs. The good news is that there is a version of g++ for Windows. I suggest you download the Dev-C++ package including the MinGW compiler system from http://www.bloodshed.net/dev/devcpp.html. This is an IDE that works with g++. Since you are already using g++ (DJGPP I presume), you shouldn’t have much trouble making the transition.

You cannot use OpenGL in DOS programs.

Sure you can. All you have to do is find an implementation that supports OpenGL under DOS.

Mesa3D is e such an implementation. With Mesa3D, it’s even possible to get hardware acceletation under DOS. Only on pre Voodoo3 cards though.

Sure, in theory you can use OpenGL in any OS. But most 3D hardware only has drivers for windows type systems. I think Hurle will just have to step into the new millenium with the rest of us and start using Windows. You get all the functionality of DOS (through console applications) plus a lot more.

If I remember right, Mesa3d can’t officially be called OpenGL for some legal reasons, even though the functions are the same. Just a technicality, I know, but if you are using Mesa3d, you aren’t technically using OpenGL.

Anyway, there are a number of free Windows compilers you can use. Borland’s command-line tools, Cygwin, Dev-C++.

Thanks for the help folks. Hurle