0

I just made a simple black window game using Visual Studio Community 2015, but found myself have no idea how to send the program to my friends, who don't have the Visual Studio installed to test.

  • I tried to send the exe under debug folder but it does not worked(missing dll)
  • I saw some similar problem getting answered, but they are all about other versions of Visual Studio -- I cannot find the "publish" under project properties.

I am new to C++ and it is possible that I made some stupid mistakes.

  • Look for VS2015 ClickOnce - it should create an installer for you, although I am not certain if it works with C++ projects. – Andrew Morton May 30 '16 at 16:29
  • This is the problem I am having right now. VS community (the free version I am using) has a different property window than the normal version. With this different window, I have no idea how to access the functions you said(or Microsoft take that out for the free version?). – Shampooooo May 31 '16 at 14:51
  • If you have all your references (right-click and choose Properties on each) set to "Copy Local: True" then you will find them all conveniently the correct version and in the same folder as the executable when you build the project. There are free installer-builder programs available, e.g. Inno Setup. – Andrew Morton May 31 '16 at 14:57
1

You most likely have to:

  1. Change the project configuration to Release

configuration


  1. Build (Right-click the project, click Build, or do it via Menu).

  1. Look up in the Output directory for the .exe file. You can see or change the output directory by right-click the Project and selecting Properties.

properties


  1. Copy the generated program, compress it with a password (optional, but needed for some e-mail servers) and send it.

If upon executing in another computer you get some messages about missing msvcr120.dll, you can do one of the following:

  • Ask your friend to download and install the Visual C++ 2015 Redistributable package. Update 3 (link) may be necessary, I'm not sure but I think not. Or...

  • Copy the missing DLL from the C:\Windows\System32 directory in your computer, and send it along with your program. Or...

  • Change this setting in your VC++ project:

    Properties -> C/C++ -> Code Generation -> Runtime Library

    Multi-threaded DLL (/MD) will be selected. You can then change it to Multi-threaded (/MT). Click OK to confirm the dialog. Then rebuild the program and send it over. Note that the final program will be much larger if you choose this option.

Tip: "Exporting" an EXE file is known as building and consists in "compiling" your source code plus "linking" your program.

0

If you just want to send it to them quickly, a solution would be to zip up the .exe and any required .dlls into a zip file and send that to them. They could extract it from the zip and run it then.

Although keep in mind a lot of email scanners could potentially block .zip files from going through.

  • So where can I find those dlls? One of my friends actually tried to download those dll online and the application fails to start(0xc000007b). It is very possible he was using bad source of dll though. – Shampooooo May 31 '16 at 0:37
  • Nah,I just found those dll under visual studio location and sent them, but it still says the application fails to start(0xc000007b)....... – Shampooooo May 31 '16 at 0:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.