Visual Studio 2019, trying to debug, MSVCP140_APP.dll not found - c++

I have created a Visual Studio 2019 solution under Windows 10, which contains 2 C++ projects. The first builds a dll, the second - an executable which, amongst others, uses the dll created by the first project.
I fail to start the executable with the error
"The code execution cannot proceed because MSVCP140_APP.dll was not found. Reinstalling the program may fix this problem."
Both trying to debug using Visual Studio and trying to start an exe from the file browser fail.
Both Debug and Release modes fail.
Obviously I've tried to search for the solution and obviously I did not find it. Quite often UWP pops up but I have no idea why should I even know what it is if I have created the solution with the complete code from scratch...
Note: both projects use some external packages and everything worked fine under one project, before I did the split (in a different solution). After the split, the dll links to embree, and the exe to glfw and glew.

Related

Using VS2015 Express, deleted VS2013 Community, can't run "MSVCP120d.dll missing"

As per the title. I had VS2013 Community installed, I had started a project on that and then moved on the VS2015 Express and converted the project. Recently I needed extra space on my machine so I deleted 2013C using Add or Remove Programs, but now my code gives an exception immediately on running, saying "The program can't start because the MSVCP120D.dll is missing from your computer. Try reinstalling the program to fix this problem." I went and installed the VS2013 redist, and the problem still persists. Is it possible to solve this without reinstalling the entirety of VS2013?
The odd thing is, the DLL it's looking for is a debug DLL, and I'm running the .code in release mode, and I did check, the runtime library is /MT not /MTd
The .dll doesn't exist in my /Windows/System32 folder despite me having installed the redist.
Edit: I found a copy of the dll and installed it but not the code just doesn't run, it doesn't give the same exception but it just says failed to start.
The d library is not "redistributable" and only exists in the development environment.
My recommendation is to use the depends tool (drag executable into depends.exe and it shows the dll dependency), which is part of the windows kits SDK to open your executable.
That should highlight a DLL which was built with the earlier 120d configuration, and can be re-built.
I think the VS 2013 is a side-by-side assembly, and has very strange locations (windows\system32\winsxs).

Visual Studio 2012 does not generate exe

I've a C++ project in Visual Studio 2012 Express, and I started having problems lately. When I compile the project it works, nothing wrong, however when I try to execute it the .exe disappears. I mean, I compile the project, the project generates the exe file with no problems, but if I try to execute it from Visual Studio or directly from the output directory, Windows say to me:
Cannot start the program 'C:\Users\Adrian\Dropbox\MyApp\Debug\MyApp.exe'.
The system can not find the file specified
If I create another project, Hello World for example, there is no problem and the exe generates and executes good. So I guess the problem is specific to my project. I tried disabling Avast (because maybe he delete the file) and the problem persists.
Also I create another project, including the files and... the problem is still here...
I check the project options, specifically general and debug options and I see nothing wrong.
So does anyone have an idea what may be wrong?
The output directory is $(SolutionDir)$(Configuration)\ and I'm compiling in Debug mode.
The windows error message is misleading. It should state that, loading a library (dll) failed. You might run the program with a process monitor (see: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx)

MSVCR100D.dll error at runtime

Ok , so i created a program using VC++ 2010. it ran just fine.
Got to work and could only install vc++ 8 due to having a crappy computer that is still stuck on xp sp2...
Everything will link up and build with no errors, But when the program starts to run i get "This application has failed to start because MSVCR100D.dll was not found"
I tried changing the runtime libary from MDd to MTd but still no luck...any idea?
That DLL comes with Visual Studio 2010. If you want to use your program, you'll somehow have to get your hands on it. If possible at your work, you can download it. Another (probably better) option would be to take it with you from home on a USB drive.
Edit: You can also try re-creating the project, and then copying the source code over into the new project. Your newly created project (in Visual Studio 2008) should not be depending on that erroneous DLL.
Edit 2: As Hans Passant added in a comment, this DLL is needed by Debug compilations of your program. So if you simply compile as Release, you can safely ignore the first part of my post. (I hope I'm not breaking gentleman rules by adding this to my post.)
MSVCR100D.dll is for debug mode, and is installed with visual studio 2010, since 2008 has MSVCR80D. You can just google that and download it, and put it in the same direcrory, or just complie in release mode.
here is a download link. You need the small download zip file button, not the big ones.
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d
As I know, MSVCR100D is debug version of runtime library used by VC2010。So, if your point either is:
(1) you do not have that dll which you really need, you can download at http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d or
(2) you want to run that program without requirement of MSVCR100/D.dll, you may need to recreate a project in VC8, then substitute with your source files (not solution file or other files managed by Vistual Studio).
FYI: If my memory were not going wrong, I remember that a project created by higher version of VS cannot be opened directly by lower version one. So, how did you build them?

My Qt5 executable does not run outside of Visual Studio 2010

I have done a big project with Qt5 and visual Studio 2010. Everything is well inside of visual studio using the run button.
But my goal is of course to release it to other persons, without visual studio.
My problem is: I can't get the .exe run outside of visual studio. I was asked for several dll's at first, I found them all in the Qt5 bin folder.
But know I got rid of those messages, when I wan't to open my exe, nothing happens.
Just nothing.....
I cannot even find my exe in the windows task manager.
Does someone here know an answer to that issue?
There are dll files that are loaded during runtime and don't give you any error, warning or whatsoever when not present (also totally transparent to dependency walker). Such is the platforms\qwindows.dll - note that it must be in a platforms\ subfolder relative to the executable. You might also be missing libEGL.dll and libGLESv2.dll.
Dependency Walker is not very useful in this case as it shows very strange dll files missing: API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL etc.
You can use Qt5.x cmd prompt ( 5.x is the version that you are using) and run windeployqt.exe from your build directory. It will automatically find and copy all necessary dll files to your output directory.

Can't Compile Solution in Debug Mode Because MSVCR100D.dll is Missing

I am running Microsoft Visual Studio Express 2012 for Windows Desktop on a 64 bit machine with windows 8.
I create a completely new Win32 Console Application (in C++) and accept the default options. I then build and run the solution in both debug and release modes and it works all find and dandy. Next I configure the include and library directories for the dynamic SFML library. I link to the debug and release .lib files and put the debug and release .dll files in the proper directories. I then add some simple code which uses the library, build and run the application in debug mode and I get this error: "The program can't start because MSVCR100D.dll is missing from your computer. Try reinstalling the program to fix this problem." If I build and run the application in release mode it works with no errors. (And yes I have the redistributables installed 32 and 64 bit.) Now from what I understand and according to this thread that .dll file is for debugging only and is not included in the redistributable package (which would explain why it doesn't work in debug mode). The answer says that developers have it installed with visual studio by default. This is obviously not the case as evidence from the error and I've reinstalled visual studio and restarted my computer twice now.
In conclusion, how do I simply compile my solution in debug mode without getting this error?
I'm afraid someone will mark this as a duplicate so here we go:
LINK - "...you appear to be linking to the debug version of the runtime, it is not normal to distribute apps linked against the debug version of the runtime."
Doesn't pertain to me because I'm not distributing this app, just trying to run it in debug mode.
LINK - "I compiled my program using Microsoft visual c++ 2010 Express Edition and tried to run it on another machine that did not have the same compiler."
This person get's the error when he runs what hes compiled on a different computer, not when actually compiling the application.
LINK - "If you get this error for your release build..."
I dont.
LINK - "You can compile your project in "Release"..."
My project is not ready to be released therefore I should compile my project in debug mode.
MSVCR100D.dll is the dll for Visual Studio 10, so somewhere something is depending on it (the SFML dlls?). Whatever you compile (in debug mode) with Visual Studio 2012 will require MSVCR110D.dll, which you should have available on your machine as part of the installation.
I suggest you build SFML yourself on your own version of Visual Studio, it's pretty easy. In fact, the binaries available on the site as part of the SFML 2.0 RC are rather old and you'll do yourself a huge favor by building from the latest sources, as a lot of fixes and improvement were applied in the meantime.
(Also, definitely use 2.0 instead of 1.6. The site is rather misleading, but on the SFML forums virtually everyone will recommend you use the last version)
This message generally states that the dll is referred to directly or indirectly in your application and is missing.
The 'D' at the end show us this is the Debug version of the file, this is DLL file is provided with the Visual Studio 2010 installation. So the MSVCR100D.dll would be provided with the installation of Visual Studio 2010.
Of course, you could be missing other versions 2008 (MSVCR90D) 2010 (MSVCR100D) 2012 (MSVCR110D) or the 2013 (MSVCR120D), each dll is provided according to the Visual Studio version.
There are a few ways to solve this:
Check to be sure that you're compiling all the components of your
project in Release mode. If this does not solve the issue continue
to the next steps.
You could solve this locally by installing Visual Studio 2010 on your
machine. This is not what I would recommend, but it would surely
overcome the issue
You could also download the file from this third party website and
copy it to your projects bin:
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d
This option is the LEAST recommended option.
Run dependency Walker and see what file depends on the MSVCR100D.dll
and the try and fix that file in order to break your dependency. You can download depends here: http://www.dependencywalker.com/
Check to be sure that you're project is linking the correct version of
the CRT and any other libraries you may be using (e.g., MFC, ATL,
etc.)
Note: Installing the redistributables alone will NOT solve this problem, since the redistributables only contain the release version of the file MSVCR100.dll (notice no 'D')
MSVCR100D is part of the 2010 Visual Studio package - indicating that some components of your system are compiled with the older version of Visual Studio, so you will need to install the Visual Studio 2010 version - you can probably still develop with the 2012 version, just as long as [parts of] the 2010 is on the machine.
Or you need to recompile some components that your application depends on to use the 2012 (msvcr110d) libraries - if you have all the source code, that would be my preferrred method.