Making a stand alone program

Apr 17, 2011 at 5:25pm
I have designed a simple console program using VC++ 10. Now I want to give it t a friend or use it on another computer that doesn't have VC++, NET framework etc installed.
Is it possible to do so?
Apr 17, 2011 at 6:28pm
Yes it is!

To run a .NET application your friend will need to install the .NET Framework onto their machine.
another computer that doesn't have VC++, NET framework etc installed.
Also another important note: you need to compile the application in Release mode NOT Debug mode.

Applications compiled in Debug mode require Visual Studio to be present on the machine executing it. This is to facilitate VS's debugging tools (such as QuickWatch among others). Debug application executables are also unoptimised (depending on your compiler settings), which can lead to strange behavior in Release executables.

Applications compiled in Release mode do not require Visual Studio to be present on the machine, however a lot of debugging tools will not function, this usually is not a problem as this is usually done when all debugging has been completed.

An informative link: http://en.wikipedia.org/wiki/.NET_Framework

I hope this helps.
Last edited on Apr 17, 2011 at 6:30pm
Apr 17, 2011 at 6:40pm
Also another important note: you need to compile the application in Release mode NOT Debug mode.

How do I compile an application in the Release Mode?
Can you post the complete instructions?
Apr 17, 2011 at 7:20pm
This might get a bit messy...

On your "standard" tool bar (see image: http://geekswithblogs.net/images/geekswithblogs_net/elroydsilva/8932/o_Solution_Configurations_Mode.JPG), there should be a drop down box with either Debug or Release (mostly likely Debug in your case).

Click on this box and select Release.

Done.

I hope this helps.

P.S: The "standard" tool bar appears under the menu bar.
Apr 18, 2011 at 6:36am
It didn't work. I sent it to a friend and yet he is reviving the same message, that reinstalling may solve the problem and that thefile MSVC.dll is missing.
Apr 19, 2011 at 6:33pm
Does not matter if you compile your program as debug or release, to make it NOT dependent of msvcp100d.dll/msvcr100d.dll (debufg version, NOT redistributable according to Microsoft license) or msvcr100.dll/msvcp100.dll (release version, redistributable) compile your c++ program with /MTd or /MT switch.
Apr 20, 2011 at 3:46am
compile your c++ program with /MTd or /MT switch.

What does this mean?
Apr 20, 2011 at 7:06am
If it's a console application, you shouldn't need .NET, though perhaps you would need MSVC++ redistributable.

If the error is talking about MSVC, get your friend to download and install the Microsoft Visual C++ Redistributable from Microsoft's website.

32bit: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84

64bit: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=BD512D9E-43C8-4655-81BF-9350143D5867

Hope this helps.
Apr 20, 2011 at 7:33am
I gave him the link. But I wanted to know, that if there is any way to do so without MSVC++ being in a computer. Say I give it too 50 friends, I can't ask them all to download the it
Apr 20, 2011 at 8:11am
Well you can check out the MSVC license. Many Steam games, etc. install MSVC redist during install. It is a redistributable, so you are supposed to distribute it with MSVC applications, I believe.

However, I have no idea under what license this distribution occurs. It may involve costly license fees. Perhaps someone else knows more about the details.

EDIT: Maybe this tutorial would be informative: http://msdn.microsoft.com/en-us/library/dd293575.aspx
Last edited on Apr 20, 2011 at 8:19am
Topic archived. No new replies allowed.