<bdo id='HWRTn'></bdo><ul id='HWRTn'></ul>
      <legend id='HWRTn'><style id='HWRTn'><dir id='HWRTn'><q id='HWRTn'></q></dir></style></legend>
    1. <tfoot id='HWRTn'></tfoot>
      <i id='HWRTn'><tr id='HWRTn'><dt id='HWRTn'><q id='HWRTn'><span id='HWRTn'><b id='HWRTn'><form id='HWRTn'><ins id='HWRTn'></ins><ul id='HWRTn'></ul><sub id='HWRTn'></sub></form><legend id='HWRTn'></legend><bdo id='HWRTn'><pre id='HWRTn'><center id='HWRTn'></center></pre></bdo></b><th id='HWRTn'></th></span></q></dt></tr></i><div id='HWRTn'><tfoot id='HWRTn'></tfoot><dl id='HWRTn'><fieldset id='HWRTn'></fieldset></dl></div>

      <small id='HWRTn'></small><noframes id='HWRTn'>

      系统错误:程序无法启动,因为您的计算机缺少 MSVCP140D.DLL.尝试重新安装程序以解决此问题

      System error: The program can#39;t start because MSVCP140D.DLL is missing from your computer. Try reinstalling the program to fix this problem(系统错误:程序无法启动,因为您的计算机缺少 MSVCP140D.DLL.尝试重新安装程序以解决此问题) - IT屋-程序
    2. <small id='ix2sa'></small><noframes id='ix2sa'>

      <i id='ix2sa'><tr id='ix2sa'><dt id='ix2sa'><q id='ix2sa'><span id='ix2sa'><b id='ix2sa'><form id='ix2sa'><ins id='ix2sa'></ins><ul id='ix2sa'></ul><sub id='ix2sa'></sub></form><legend id='ix2sa'></legend><bdo id='ix2sa'><pre id='ix2sa'><center id='ix2sa'></center></pre></bdo></b><th id='ix2sa'></th></span></q></dt></tr></i><div id='ix2sa'><tfoot id='ix2sa'></tfoot><dl id='ix2sa'><fieldset id='ix2sa'></fieldset></dl></div>

        <tbody id='ix2sa'></tbody>

    3. <legend id='ix2sa'><style id='ix2sa'><dir id='ix2sa'><q id='ix2sa'></q></dir></style></legend>
    4. <tfoot id='ix2sa'></tfoot>
        <bdo id='ix2sa'></bdo><ul id='ix2sa'></ul>

              • 本文介绍了系统错误:程序无法启动,因为您的计算机缺少 MSVCP140D.DLL.尝试重新安装程序以解决此问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                所以我在 Visual Studio 2015 中使用 SFML 编写了一个简单的图形蛇游戏它在我的主计算机上完美运行.我想我应该在我的笔记本电脑上尝试一下.运行程序时,它给了我这个错误:系统错误:程序无法启动,因为您的计算机缺少 MSVCP140D.DLL.尝试重新安装程序以解决此问题所以我在我的电脑中搜索并找到了它,所以我将它复制到我的笔记本电脑上,然后我再次收到另一个错误,它是:应用程序错误:应用程序无法正确启动 (0xc000007b).单击确定"关闭应用程序.我尝试重新安装 Microsoft Visual C++ Redistributable,但仍然无法正常工作.(顺便说一句,这不是代码问题,我已经正确安装了 SFML 并使用了它的库和 bin 没有任何问题).你的帮助对我来说意义重大.谢谢!这是我的代码:

                So I have programmed a simple graphical snake game using SFML in visual studio 2015 and it runs perfectly on my main computer. And I thought that I should try it on my laptop. When running the program it gave me this error: System error: The program can't start because MSVCP140D.DLL is missing from your computer. Try reinstalling the program to fix this problem So I searched it in my computer and found it so I copied it on my laptop and then again I received another error which was: Application error: The application was unable to start correctly (0xc000007b). Click OK to close the application. I tried reinstalling the Microsoft Visual C++ Redistributable and still it didn't work. (BTW it is not a code problem and I have installed SFML correctly and used its libraries and bins without any problem). Your help would mean a lot to me. Thank you! Here is my code:

                // 
                GraphicalLoopSnakeGame.cpp : 
                Defines the entry point for 
                the console application.
                //
                #include "stdafx.h"
                #include <SFML/Graphics.hpp>
                #include <time.h>
                using namespace sf;
                
                int N = 30, M = 20;
                int size = 16;
                int w = size*N;
                int h = size*M;
                
                int dir, num = 4;
                
                struct Snake
                {
                    int x, y;
                }       s[100];
                
                struct Fruit
                {
                    int x, y;
                }   f;
                
                void Tick()
                {
                    for (int i = num;i>0;--i)
                {
                        s[i].x = s[i - 1].x; 
                        s[i].y = s[i - 1].y;
                }
                
                if (dir == 0) s[0].y += 1;
                if (dir == 1) s[0].x -= 1;
                if (dir == 2) s[0].x += 1;
                if (dir == 3) s[0].y -= 1;
                
                if ((s[0].x == f.x) && (s[0].y == f.y))
                {
                    num++; f.x = rand() % N; f.y = rand() % M;
                }
                
                if (s[0].x>N) s[0].x = 0;  if (s[0].x<0) s[0].x = N;
                if (s[0].y>M) s[0].y = 0;  if (s[0].y<0) s[0].y = M;
                
                for (int i = 1;i<num;i++)
                    if (s[0].x == s[i].x && s[0].y == s[i].y)  num = i;
                }
                
                int main()
                {
                        srand(time(0));
                        RenderWindow 
                    window(VideoMode(w, h), 
                "Snake Game!");
                
                Texture t1, t2, t3; 
                t1.loadFromFile("images/white.png");
                t2.loadFromFile("images/red.png");
                t3.loadFromFile("images/green.png");
                
                Sprite sprite1(t1);
                Sprite sprite2(t2);
                Sprite sprite3(t3);
                
                Clock clock;
                float timer = 0, delay = 0.12;
                
                f.x = 10;
                f.y = 10;
                
                while (window.isOpen())
                {
                    float time = clock.getElapsedTime().asSeconds();
                    clock.restart();
                    timer += time;
                
                    Event e;
                    while (window.pollEvent(e))
                    {
                        if (e.type == Event::Closed)
                            window.close();
                    }
                
                    if (Keyboard::isKeyPressed(Keyboard::Left)) dir = 1;
                    if (Keyboard::isKeyPressed(Keyboard::Right)) dir = 2;
                    if (Keyboard::isKeyPressed(Keyboard::Up)) dir = 3;
                    if (Keyboard::isKeyPressed(Keyboard::Down)) dir = 0;
                
                    if (timer>delay) { timer = 0; Tick(); }
                
                    ////// draw  ///////
                    window.clear();
                
                    for (int i = 0; i<N; i++)
                        for (int j = 0; j<M; j++)
                        {
                            sprite1.setPosition(i*size, j*size);  window.draw(sprite1);
                        }
                
                    for (int i = 0;i<num;i++)
                    {
                        sprite2.setPosition(s[i].x*size, s[i].y*size);  window.draw(sprite2);
                    }
                
                    sprite3.setPosition(f.x*size, f.y*size);  window.draw(sprite3);
                
                    window.display();
                }
                
                return 0;
                }
                

                推荐答案

                您正在使用调试 Visual Studio 运行时,如果您想在另一台计算机上尝试它,您应该在发布模式下重新编译您的代码并确保适当的视觉效果已安装 Studio 运行时可再发行组件.

                You are using the debug visual studio runtime, if you want to try it on another computer you should recompile your code in release mode and make sure that the appropriate visual studio runtime redistributable is installed.

                如果您真的需要在另一台机器上运行调试可执行文件,您需要确保复制正确的运行时(32 位或 64 位,根据您编译程序的方式),这可以在 中找到C:Program Files (x86)Microsoft Visual Studio2019ProfessionalVCRedistMSVC14.24.28127debug_nonredist(至少对于visual studio 2019,具体路径会略有不同,具体取决于你的Visual Studio 版本,例如 Visual Studio 2015 使用 C:Program Files (x86)Microsoft Visual Studio 14.0VC edistdebug_nonredist).

                If you really need to run a debug executable on another machine you need to make sure you copy the correct runtime (32 or 64-bit according to how you've compiled your program), this can be found in C:Program Files (x86)Microsoft Visual Studio2019ProfessionalVCRedistMSVC14.24.28127debug_nonredist (at least for visual studio 2019, the exact path will be slightly different depending on your visual studio version, e.g. visual studio 2015 uses C:Program Files (x86)Microsoft Visual Studio 14.0VC edistdebug_nonredist).

                这篇关于系统错误:程序无法启动,因为您的计算机缺少 MSVCP140D.DLL.尝试重新安装程序以解决此问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                What is inside .lib file of Static library, Statically linked dynamic library and dynamically linked dynamic library?(静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么?)
                How do I load a C DLL from the SXS in Python?(如何从 Python 中的 SXS 加载 C DLL?)
                Can Cython code be compiled to a dll so C++ application can call it?(Cython 代码可以编译成 dll 以便 C++ 应用程序可以调用它吗?)
                Delay Loading DLLs(延迟加载 DLL)
                Throwing C++ exceptions across DLL boundaries(跨 DLL 边界抛出 C++ 异常)
                Loading a dll from a dll?(从 dll 加载 dll?)
                      <tbody id='LT3h9'></tbody>

                    <small id='LT3h9'></small><noframes id='LT3h9'>

                    • <bdo id='LT3h9'></bdo><ul id='LT3h9'></ul>
                      <tfoot id='LT3h9'></tfoot>

                      • <i id='LT3h9'><tr id='LT3h9'><dt id='LT3h9'><q id='LT3h9'><span id='LT3h9'><b id='LT3h9'><form id='LT3h9'><ins id='LT3h9'></ins><ul id='LT3h9'></ul><sub id='LT3h9'></sub></form><legend id='LT3h9'></legend><bdo id='LT3h9'><pre id='LT3h9'><center id='LT3h9'></center></pre></bdo></b><th id='LT3h9'></th></span></q></dt></tr></i><div id='LT3h9'><tfoot id='LT3h9'></tfoot><dl id='LT3h9'><fieldset id='LT3h9'></fieldset></dl></div>

                          <legend id='LT3h9'><style id='LT3h9'><dir id='LT3h9'><q id='LT3h9'></q></dir></style></legend>