Mingw32: all compiled executables freeze

I just installed the latest version of mingw32 and am trying to compile even the hello world C ++ program.

The installation was in the default C: / MinGW directory. I chose the installation option using mingw-get gui, and I selected the Basic Setup tab in the left column, marking the mingw32-base and mingw32-gcc-g ++ options for installation. Then I applied the changes and uploaded all the files. Finally, I added C: / MinGW / bin to the windows path.

Now I am creating a file that looks like this:

test.cpp:

#include <iostream>

int main() {
    std::cout << "hello world!" << std::endl;
    return 0;
}

and then compile with g++ test.cpp

Now the problem is a little more difficult to diagnose. When I run the output file a.exe, the command line just hangs, there is no exit, there is no return. If I try to cancel execution using ctrl-c, nothing will happen. When I forcefully exit the command line and try to delete a.exe, the windows tell me that the executable file is currently opened by the system, and the only way to forcefully delete the file is with FileASSASSIN.

Some notes, I have visual studio 12, but nothing related to it on the way. I had a previous installation of cygwin64, but it was completely removed. I get the same behavior as its action from the command line, regular command line or Console2. Google suggested I try to statically link libstdc ++ to -static-libstdc++no avail.

, , gdb a.exe, start, .

. - ?

+4
1

@M.M, , avast , mingw32. , , .

: , .

+2

Source: https://habr.com/ru/post/1615016/


All Articles