-1

I have been working very hard on a program for awhile. I now need to send out my .exe to some friends so that they can test my collision code and intuitiveness of the simulation.

However when i give the .exe to friends it does this... I would post a picture but I don't have the credibility yet. Here is the text

PlatformDemoA (1).exe- System Error

The program can't start because MSCR100D.dll is missing from your computer. Try reinstalling the program to fix the problem.

I'm going to assume this is because they don't have VS 2010 on their computers. Is their any way to get this .exe to work on their computers without having Visual Studio? Every place online says to install Visual Studio.

I am predicting that perhaps creating a "release" build instead of a debug might fix this up. However when I try to build one... Suddenly errors show up relating to files I have included. Apparently I am supposed to set the linker to include them in the release builds... I can't find that setting. Here are the errors:

1>------ Build started: Project: PlatformDemoA, Configuration: Release Win32 ------
1>  Triangle.cpp
1>Triangle.cpp(2): fatal error C1083: Cannot open include file: 'GLTools.h': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I went ahead and copied all of these things into the "release" folders.. That didn't fix things. I guess I really don't understand the linking of files. If you would be willing to I could upload the project folder so you can tell me about how many time I have unnecessarily copied files.

My platform is Windows, and my target platform is also windows.

eddie
  • 1,252
  • 3
  • 15
  • 20
Andrew
  • 121
  • 6
  • possible duplicate of [MSVCP100D.dll missing](http://stackoverflow.com/questions/7904213/msvcp100d-dll-missing) – Lynn Crumbling May 24 '15 at 00:24
  • You need to know that a release build uses a completely different set of project settings (import libraries, search paths, etc) from a debug build. If you've been adjusting the configuration of the debug build during development, you'll now have to make all the same changes to the release build. – Ben Voigt May 24 '15 at 00:52
  • Where do i make the changes to the project settings for the release build? – Andrew May 24 '15 at 00:59
  • @BenVoigt BTW I am in visual studio 2010 – Andrew May 24 '15 at 01:05
  • Just right-click your project and choose properties. It's the same place you adjusted the debug configuration. The dialog defaults to changing your active configuration, but there's a dropdown at the top you can use to go back and forth. – Ben Voigt May 24 '15 at 01:19

1 Answers1

0

The MSCR100D.dll is the debug runtime library and it's not recommended (actually not even allowed by Microsoft) to ship executables which link to it. Change it to "release" mode and either tell your customers to install the visual c++ runtime, or include the MSVCR100.dll into the folder, or, link the runtime statically. The release DLL should be already installed on most systems anyway.

You can set the link options in Visual Studio here:

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

adjan
  • 13,371
  • 2
  • 31
  • 48
  • Also, you can't distribute the MS debug runtime anyway. That would be in violation of the Microsoft's EULA. – PaulMcKenzie May 24 '15 at 00:16
  • What do i set it to iff I want it not to run with the MSCR100D.dll library? – Andrew May 24 '15 at 00:23
  • @Andrew I told you. Set it to use the "relaese" runtime library. ( it's called `MSVCR100.dll` without `D` ) - see my answer above – adjan May 24 '15 at 00:23
  • My options are like this [link](http://i.imgur.com/gMJq3pY.png). Do i choose one or type in the dll name? I am very unfamiliar with this part of programming (linking files... dll's... runtimes... compile settings) so please bare with me. – Andrew May 24 '15 at 00:28
  • Choose one of the options not containing "Debug". The "Multi-Threaded" links the runtime statically, making you exe bigger. The "Multi-Threaded DLL" adds a dynamic link to the `MSVCR100.dll` that should be installed on most computers (if not, users have to install the Visual C++ Runtime Redistributable, or you can simply add the DLL to your folder containing the exe) – adjan May 24 '15 at 00:32
  • Doing that causes a bunch of linker errors. How do I resolve those. – Andrew May 24 '15 at 00:39
  • If i build in debug it get [these](http://pastebin.com/92szj0Yh) If I build in release i get [these](http://pastebin.com/ZQ1zZesE) (these both have the hyperthread thing set) – Andrew May 24 '15 at 00:51