简体   繁体   English

mingw产生损坏的.exe

[英]mingw produces broken .exe

I have installed the newest MinGW suite. 我已经安装了最新的MinGW套件。 My project still compiles without any error but the produced executable is not working. 我的项目仍然可以编译,没有任何错误,但是生成的可执行文件不起作用。 Starting it results in the well known windows xp error message. 启动它会导致众所周知的Windows XP错误消息。 Paradoxically source code like 自相矛盾的源代码,例如

#include <stdio.h> 
int main()
{
    printf("test\n");
    return 0;
}

produces a working executable while 产生有效的可执行文件

#include <iostream>
int main()
{
    std::cout << "test\n" << std::endl; 
    return 0;
}

compiles fine but the executable is broken as described above. 编译正常,但可执行文件如上所述损坏。

Before i made the update everything worked. 在进行更新之前,一切正常。 So what goes wrong here? 那么,这里出了什么问题?

Do you have the libstdc++-*.dll in the path? 路径中是否有libstdc ++-*。dll? It may be shared in newer MinGW versions, and std::cout uses it. 它可能在较新的MinGW版本中共享,并且std :: cout使用它。

诸如Process Monitor之类的工具可能会更详细地告诉您实际出了什么问题,甚至可能告诉您需要进行修复才能使其正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM