creating exe file for opengl game

Started by
14 comments, last by V-man 13 years ago
Your glut32.dll should go into the same folder as your EXE. It is recommended not to put DLL into the WIndows\System32 folder.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Advertisement
i tried going by these instructions:
http://www.ferdychristant.com/blog//articles/DOMM-6XPRW9
i put the regular (debug) exe and the release exe in the same folder with glut32.dll and opengl32.dll. tried it on another computer - wont work.
after that i trued compiling again with the settings presented there:
"In the project properties Window, section C/C++ ->Code generation, set the "Runtime library" value to "Multi-threaded (/MT)" for the release configuration (upper left dropdown), and "Multi-threaded Debug (/MTd)" for the debug configuration."
and all of a sudden it wouldnt compile. the error:
1>cl : Command line error D8016 : '/MT' and '/clr' command-line options are incompatible


any thoughts?
First, you should not distribute the debug executable. That's against Microsofts EULA.
Second, don't distribute opengl32.dll. That's a system DLL that comes with Windows.
Third, the problems you had are with the runtime libraries. You can solve that by static linking (as you tried), or by distributing the runtime with your game (several possibilities here). Your static linking doesn't work because you're compiling as managed code. Try removing the clr option.
If he uses .dlls like GLUT, he should not link statically. Not at all.
Instead, deliver the Microsoft Runtime Installer and link dynamically.
You said you have C++ Code in Visual Basic? That is not possible at all.
Assuming you use Visual C++ with SP1 2008 you need to give this installer with your program:
http://www.microsoft.com/Downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2
If you say "pls", because it is shorter than "please", I will say "no", because it is shorter than "yes"
http://nightlight2d.de/
sorry, i meant visual studio. i will check the link tomorrow, thank you!
http://www.opengl.org/wiki/FAQ#How_Does_It_Work_On_Windows.3F
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

This topic is closed to new replies.

Advertisement