PDA

View Full Version : generate standalone exe



aje1234l
09-09-2015, 03:01 AM
Hello i am working on a opengl project in visual studio 2010.
I saw in various opengl tutorials on internet (e.g. nehe tutorials) that their projects have a standalone exe of the project which makes it possiblle to run on computers either they have visual studio installed or not.
How can i generate the same standalone exe ?

And i am not talking about the exe in the debug folder.

Thank you in advance...

GClements
09-09-2015, 03:33 AM
Hello i am working on a opengl project in visual studio 2010.
I saw in various opengl tutorials on internet (e.g. nehe tutorials) that their projects have a standalone exe of the project which makes it possiblle to run on computers either they have visual studio installed or not.
How can i generate the same standalone exe ?

And i am not talking about the exe in the debug folder.

Well, the one you'd distribute would normally be in the Release folder.

A "standalone" executable just means that any libraries which might not exist on the destination system are linked statically rather than as DLLs.

You can safely assume that all of the standard windows DLLs (user32.dll, gdi32.dll, kernel32.dll) will exist on the target system, along with opengl32.dll and glu32.dll. The MSVCRT DLL (msvcrXX.dll where xx is the version number) will often exist but it isn't guaranteed. Other libraries (GLEW, GLUT, GLFW, SDL, etc) can't be assumed to exist and need to be linked statically.

Typically, this involves selecting the correct .lib file in the linker options. E.g. for GLEW, glew32.lib is a stub which links to glew32.dll, while glew32s.lib is a static library.

aje1234l
09-09-2015, 11:42 PM
Thanks for your reply

Because i am not quite familiar yet with library and dll linking, what you suggest me to do.