PDA

View Full Version : Windows.h for OPENGL



Hurle
09-15-2002, 07:35 AM
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

*Aaron*
09-15-2002, 09:38 AM
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.

Hurle
09-15-2002, 03:18 PM
Originally posted by *Aaron*:
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.



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?

*Aaron*
09-15-2002, 05:51 PM
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.

Bob
09-15-2002, 10:54 PM
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 (http://www.mesa3d.org/) is e such an implementation. With Mesa3D, it's even possible to get hardware acceletation under DOS. Only on pre Voodoo3 cards though.

*Aaron*
09-16-2002, 09:11 AM
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.

Deiussum
09-16-2002, 10:09 AM
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. http://www.opengl.org/discussion_boards/ubb/smile.gif

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

Hurle
09-16-2002, 03:28 PM
Thanks for the help folks. Hurle