0

I have a program that I made with OpenGL, but it doesn't work on PCs that don't have OpenGL installed. Is there a way to embed the necessary OpenGL files into the .exe file through the compiler?

4
Contributors
5
Replies
6
Views
10 Years
Discussion Span
Last Post by John A
0

>Is there a way to embed the necessary OpenGL files into the .exe file through the compiler?
Yes, try statically linking the libraries, which will emebed all the necessary code into the final executable. Actual process to do such a thing varies from compiler to compiler.

The easiest way, however, is to include an installation app of the OpenGL runtime libraries. Usually how most commercial games nowadays are distributed, and it saves hard disk space.

0

Yes, try statically linking the libraries, which will emebed all the necessary code into the final executable. Actual process to do such a thing varies from compiler to compiler.

How would you do this in say... dev-cpp?

0

Actually... scratch that. I was thinking of Mesa (an OpenGL clone) when I said that. There is a static library, libopengl32.a, but I believe that this somehow references the symbols from the DLL file. Sorry. :-(

Anyhow, it seems strange that the test machines don't have OpenGL installed on them at all. Are you sure that opengl32.dll and glu32.dll doesn't exist somewhere on the hard drive? If not, well, then just package the DLLs with the program and hope for the best.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.