<分区>
当我用 G.C.C. 编译它时:
#include <iostream>
#include <string>
int main()
{
std::cout << std::string("\r\n");
return 0;
}
通过使用以下批处理:
g++ -Wall main.cc
并尝试执行输出(a.exe
),然后 Windows 因以下错误使初始化崩溃:
如果我避免使用 std::string
在 C++ 代码中它正常执行,甚至包括 <string>
.有什么想法吗?
注意,第一次测试std::string
.
我运行 Windows 8/64 位。我的编译器包含此文件 build-info.txt
:
# **************************************************************************
version : MinGW-W64-builds-4.3.0
user : nixman
date : 03.30.2017- 1:01:08 PM
args : --mode=gcc-6.3.0 --buildroot=/c/mingw630 --jobs=2 --rev=2 --threads=win32 --exceptions=sjlj --arch=i686 --bin-compress
[much more here...]
# **************************************************************************
另请注意,我习惯于禁用和卸载所有可能的防病毒实用程序(例如 Windows Defender)。