本文介绍了为什么我所有的C ++程序退出与0xc0000139?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图教自己在C ++中编程,并在Windows上使用Cygwin安装g ++。一切都在游泳,直到我开始声明字符串变量。使用cout字符串字面量不会产生任何问题,但是一旦我声明一个字符串变量,程序就不再运行了。

I am trying to teach myself to program in C++ and am using Cygwin on Windows with g++ installed. Everything was going swimmingly until I started to declare string variables. Using string literals with cout causes no issues, but as soon as I declare a string variable the program will no longer run.

#include <iostream>
#include <string>

int main ()
{
  std::string mystring = "Test";
  std::cout << mystring;
  return 0;
}

前面的代码编译没有问题,但是当运行没有产生输出。 GDB提供给我如下:

The preceding code compiles without issue, but when run produces no output. GDB provides me with the following:

(gdb) run
Starting program: /cygdrive/c/Projects/CPP Test/string.exe
[New Thread 8416.0x2548]
[New Thread 8416.0x2510]
[New Thread 8416.0x1694]
[New Thread 8416.0x14f4]
[Thread 8416.0x1694 exited with code 3221225785]
[Thread 8416.0x14f4 exited with code 3221225785]
During startup program exited with code 0xc0000139.



从我设法收集的这是一个入门点问题与DLL,可能完全错误。

From what I have managed to gather this is some sort of entry point issue with a DLL, but I could be completely wrong.

有人知道我做错了什么,我错误配置了什么以及如何解决它?

Does anyone know what I have done wrong or what I have misconfigured and how to fix it?

推荐答案

我不知道什么问题是什么(如果任何人都知道我会感激!),但我能够解决它自己通过降级从GCC 5.2.0到GCC 4.9.3。

Well I'm not sure what the problem was exactly (if anyone knows I'd be grateful!), but I was able to solve it for myself by downgrading from GCC 5.2.0 to GCC 4.9.3.

这篇关于为什么我所有的C ++程序退出与0xc0000139?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 16:58