Creating executables

I'm creating a program that I plan on distributing to a multitude of people. I am using Microsoft Visual C++ 2010 Express. How can I create an executable (.exe) from my project, one that I could send to another computer and have it able to be used?

Thanks



Sean
Last edited on
When you compile your project, an executable is always generated (your program couldn't run otherwise).
Look somewhere in your project folder, it should be in a folder called "bin", "dist", "Release" or similar.
Gotcha. Thanks Arthar



Sean
Hey bud just btw whenever you compile a program using Visual C++ 2010 the computer running said executable NEEDS to have msvcr100.dll either installed on their computer or in the same directory as the .exe.

I've tried to find a way to statically link msvcr100.dll but no luck...has anyone else figured it out? Not much on google...
It seems an easy fix to that would be to just download msvcr100.dll into the folder with the executable so it's included nonetheless.

Thanks for the info man, I didn't know that.
No, that is for running debug builds. Just build in Release mode rather than Debug and it won't need that DLL.
Debug/release doesn't matter, you always need a runtime lib.

Either Supply the dll with your exe (which I don't recommend), or build the runtime lib into your exe statically.

To do the latter, right click on your Project in the solution explorer (side panel) and go to Properties. Expand the "C/C++" tree, and select the "Code Generation" page.

Look for the "Runtime Library" field on the right, change it to "MultiThreaded" for release builds, or "MultiThreaded Debug" for debug builds.

Apply and rebuild.
Be aware that unless you are very careful and explicit about how the compiler creates your EXE file, it is likely that it depends on some DLLs, some of which your user may not have installed. Make sure you distribute your application with all the required DLLs.
http://www.cplusplus.com/forum/windows/12509/
http://www.cplusplus.com/forum/general/20909/

You may want to create an installer to distribute your program. Personally, I like Inno Setup.
http://www.jrsoftware.org/isinfo.php
http://www.cplusplus.com/forum/beginner/31106/

Hope this helps.
Topic archived. No new replies allowed.