错误:在使用代码0xc000000135退出的启动程序期间

发布于 2025-02-02 04:30:36 字数 1629 浏览 2 评论 0原文

VSCODE正在显示错误消息

错误:在使用代码0xc0000135退出的启动程序期间。

当我尝试调试代码时。最初,MINGW安装显示了缺少DLL文件的错误,然后我重新安装了Mingw,现在它不再显示任何错误,并且目录正在正确更新。重新启动系统,将BIN文件夹重新添加到环境路径变量。

该文件正在正确编译和执行,仅在调试 IDE时显示错误消息

: vscode

编译器: mingw

os:< /strong> Windows

尝试修复:

  • 重新安装的mingw
  • 将bin文件夹添加到环境路径变量中,
  • 重新启动VSCODE

paintault.json for Vscode:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "g++.exe - Build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": true,
            "MIMode": "gdb",
            "miDebuggerPath": "D:\\C++\\minGW\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": false
                }
            ],
            "preLaunchTask": "C/C++: g++.exe build active file"
        }
    ]
}

code:

#include <iostream>

int main(){
    std::cout << "Hello World" << std::endl;
}

VSCode is displaying the error message

ERROR: During startup program exited with code 0xc0000135.

When I try to debug the code. Initially MinGW installation was showing the error missing dll files, then I reinstalled MinGW, now it is no more showing any errors and the catalogue is updating properly. Restarted the system, re-added the bin folder to the Environment Path Variable.

The file is being compiled and executing properly, the Error message is displayed only while debugging

IDE: VSCode

Compiler: MinGW

OS: Windows

Tried Fixes:

  • Reinstalled MinGW
  • Added the bin folder to the environment path variables
  • Restarted VSCode

launch.json for VSCode:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "g++.exe - Build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": true,
            "MIMode": "gdb",
            "miDebuggerPath": "D:\\C++\\minGW\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": false
                }
            ],
            "preLaunchTask": "C/C++: g++.exe build active file"
        }
    ]
}

Code:

#include <iostream>

int main(){
    std::cout << "Hello World" << std::endl;
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉世弥音 2025-02-09 04:30:36

我刚刚遇到了QT Creator调试器完全相同的问题(这就是为什么我来这里寻求帮助的原因)。 在命令行中运行的事情

  1. 这是我在删除路径之后从命令行中运行程序(使用“ path =”) 。这是行不通的 - 这是故意的。
  2. 请注意,它抱怨的第一个丢失的DLL。就我而言,这是pthreadgc-3.dll。
  3. 还原路径,并找出该DLL所在的位置,上面有“ pthreadgc-3.dll”)。
  4. 将DLL复制到与可执行程序相同的目录。
  5. 尝试调试程序。

这对我有用。如果它对您有用,则可以将DLL留在原处,这有点不整洁,也可以将其目录放入您的全球路径中。如果它不起作用,则可以尝试使用不同的DLL重复步骤2-5。

I just encountered exactly the same problem with the Qt Creator debugger (which is why I came here looking for help). Here is what I did to get it running in the debugger:

  1. Run the program from the command line after deleting PATH (with "PATH="). This won't work -- that is intentional.
  2. Note the first missing DLL that it complains about. In my case this was pthreadGC-3.dll.
  3. Restore PATH, and find out where that dll is located with "where pthreadGC-3.dll").
  4. Copy that dll to the same directory as the executable program.
  5. Try and debug the program.

This worked for me. If it works for you, you can either leave that DLL where it is, which is a bit untidy, or you can put its directory into your global path. If it doesn't work, you might try repeating steps 2-5 with a different DLL.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文