简体   繁体   中英

mingw produces broken .exe

I have installed the newest MinGW suite. 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. 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? It may be shared in newer MinGW versions, and std::cout uses it.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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