I have a program for DirectX, written in C++. I have compiled it through Visual Studio, but I want to run that program through the Command Prompt. I tried to run a Sample Direct3D Game from the Command Prompt just to be sure, but it did not work either. This Game works fine when I build it from Visual Studio 19 or Visual Studio 17, but I am not able to run it from the Command Prompt. Everytime I do, a window pops up with the following message.
The code execution cannot proceed because MSVCP140D_APP.dll was not found. Reinstalling the program may fix this problem.
The same message is displayed about vccorlib140d_app.Dll, CONCRT140D_APP.dll, and VCRUNTIME140D_APP.dll. However, I face no such issues when running the same program through Visual Studio. I have tried almost everything that I could find about this issue, but I could not solve it. The .exe file that I tried to run, is in the path:
..Direct3D_game_sample\cpp\x64\Debug\Simple3DGameDX
I also tried running a simple OpenCV program written in C++ to read and display a sample video file, but could not do so either. It runs perfectly through Visual Studio, but not through the Command Prompt. The OpenCV program returns the following errors.
warning: Error opening file (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:940)
warning: vtest.avi (/build/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:941)
OpenCV(3.4.9) Error: Bad argument (CAP_IMAGES: cannot find starting number (in the name of file): vtest.avi) in cv::icvExtractPattern, file C:\build\3_4_winpack-build-win64-vc15\opencv\modules\videoio\src\cap_images.cpp, line 246
[ERROR:0] VIDEOIO(cvCreateFileCapture_Images(filename.c_str())): raised OpenCV exception:
OpenCV(3.4.9) C:\build\3_4_winpack-build-win64-vc15\opencv\modules\videoio\src\cap_images.cpp:246: error: (-5:Bad argument) CAP_IMAGES:cannot find starting number (in the name of file): vtest.avi in function "cv::icvExtractPattern";
PS: I am running Windows 10 on my machine and the Sample DirectX Game App uses DirectX 11.
Thanks in advance