Sign in to follow this  
StoneMask

How to export a usable .exe in Microsoft Visual Studio 2010? [Still an issue]

Recommended Posts

This is one of the more general questions I've asked, so I can't be all super clear to help you help me, lol. But yeah, if I have a project I want to say, pack up and give to somebody so they can check it out, what exactly do I need to package with it? I've tried linking my friend projects, but they've given him this error:

[b]The program can't start because MSVCP100D.dll is missing from your computer[/b]

I'm not sure if he just paraphrased that right now, but yeah. Can't really find any results in Google or in the Help portion of MVS.
Thank you!

Share this post


Link to post
Share on other sites
Based on the -D.dll I'm guessing you're giving him a debug build. He's unlikely to have debug versions of the required libraries. Make Sure you're giving him a release build.

Share this post


Link to post
Share on other sites
How do I create a release build? Will the executable run on its own if I make it a release build? And can I still somehow give him a debug build that works?

EDIT: Nevermind. I found it, lol.

But I sent it to my friend, and it tripped one of my checks for an initialization error. Do I also need to include all the image files and .cpp/.h files in with the folder? I have one project that's nothing but a single .cpp file, and it closes after a certain amount of time for some reason without warning. There isn't a point at which it stops, it literally closes at any part of the program after a certain amount of time passes. There aren't any time-based functions in this program, but it still gives my friend this issue. I've never encountered something like this before.

Share this post


Link to post
Share on other sites
[quote name='StoneMask' timestamp='1333298740' post='4927205']
But I sent it to my friend, and it tripped one of my checks for an initialization error. Do I also need to include all the image files and .cpp/.h files in with the folder? I have one project that's nothing but a single .cpp file, and it closes after a certain amount of time for some reason without warning. There isn't a point at which it stops, it literally closes at any part of the program after a certain amount of time passes. There aren't any time-based functions in this program, but it still gives my friend this issue. I've never encountered something like this before.
[/quote]
No, you do not need to include .cpp/.h and such files. Most probably your program need MSVC100.DLL or something similar (C/C++ runtime library). I think that compiling your program with static libraries could help (Properties->C/C++->Runtime Library). Or your frined has to install the MSVC runtime - it is freely available from Microsoft.
If your program crashes at random moments, it is most probably memory bug. Finding these in C++ code is hard, as the faulty code can be in completely different place from where the crash happens.
As a starter compile the program in release mode in your computer, run it outside Visual Studio and check whether it crashes in your computer too. Then try to isolate place where the crash happens, by turning features off and on, adding debug printouts etc.
Or buy memory debugger. I do not know, whether there is any free one for Windows - under Linux and Mac there is excellent free tool called Valgrind.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this