question

10may-8855 avatar image
0 Votes"
10may-8855 asked ·

How to run a DirectX Game through Command Prompt

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






not-supported
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DSPatrick avatar image
0 Votes"
DSPatrick answered ·

C++ is not currently supported here on QnA. They're actively answering question in dedicated forums here.


https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vcgeneral


https://developercommunity.visualstudio.com/spaces/62/index.html


--please don't forget to Accept as answer if the reply is helpful--


Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management


Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.







· 2 · Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for the info @DSPatrick . Will post this question there too.


0 Votes 0 ·

You're welcome.

--please don't forget to Accept as answer if the reply is helpful--





1 Vote 1 ·