【问题标题】:Error creating std::threads in Ubuntu 13.10 x64 C++11在 Ubuntu 13.10 x64 C++11 中创建 std::threads 时出错
【发布时间】:2013-11-10 20:26:11
【问题描述】:

我不知道我的 Ubuntu 13.10 中发生了什么。我所有使用 std::threads 的函数都抛出错误消息:

在抛出 'std::system_error' 实例后调用终止
what(): Operation not allowed Aborted (core dumped)

同样的程序在 Ubuntu 13.04 64 位和 32 位上完美运行...我没有更改 Makefile 中的 g++ 参数..这似乎是 Ubuntu 13.10 x64 的一个错误..

谁能帮助我?

(对不起我的英语不好)

【问题讨论】:

  • 显示一些代码...这会更容易。
  • @LucasLellis 这不是你的错,请参阅链接问题的解决方案。
  • 感谢您的帮助。我认为他们在最近的更新中解决了这个问题^^

标签: c++ multithreading c++11 ubuntu-13.10


【解决方案1】:

您很可能在编译时缺少 -phtread 开关。如果您在单独的步骤中链接,则需要将开关 -lpthread 添加到命令行。

【讨论】:

    猜你喜欢
    • 2014-03-12
    • 1970-01-01
    • 1970-01-01
    • 2014-03-28
    • 1970-01-01
    • 1970-01-01
    • 2015-08-26
    • 2014-09-11
    相关资源
    最近更新 更多