Operating System: Windows 7 64-bit
GCC Version: 4.7.0
Binutils Version: 2.22
MinGW Installer Version: mingw-get-inst-20120426.exe
Build environment: cmd.exe
Minimal Self-Contained Test Case:
Compiling the following segment of code with the command line
g++ main.cpp -o main.exe
will produce an executable file (main.exe). However, upon running the executable file, it will result in the program crashing.
#include <string>
int main () {
std::string str;
return 0;
}
I obtained the latest version of GCC by running the installer listed earlier. During the installation process I chose the option "Download latest repository catalogues". Then, under the "Select Components" section, I checked the checkbox next to "C++ Compiler" (everything else left as default). It then downloaded and placed all of the files in C:\MinGW\. However, when I attempt to run a simple compiled program, the program will crash.
I do think this issue has something to do with the version 4.7.0, because when I do not chose the "Download latest repository catalogues" option, it will download and install version 4.6.2 (along with Binutils Version 2.22). I've never had any problems with compiling/running programs with version 4.6.2 on the exact same system setup mentioned earlier.
Running the program compiled with 4.7.0, the following is the crash report that Windows 7 gives:
Problem signature:
Problem Event Name: APPCRASH
Application Name: main.exe
Application Version: 0.0.0.0
Application Timestamp: 5090ad7a
Fault Module Name: libstdc++-6.dll
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 4ed82a4d
Exception Code: c0000005
Exception Offset: 00049edc
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 0a9e
Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
Using gcc-4.7.0 and binutils-2.22 I built your program and executed it without crashing. I'm not sure what your issue could be. Here is the md5sum of my installed libstdc++-6.dll. Does yours match?
f9e63dcfc35b7acc8a78bb42fd95e90f */mingw/bin/libstdc++-6.dll
Ticket moved from /p/mingw/support-requests/160/
Can't be converted: