<legend id='9WOEy'><style id='9WOEy'><dir id='9WOEy'><q id='9WOEy'></q></dir></style></legend>
      <bdo id='9WOEy'></bdo><ul id='9WOEy'></ul>
    1. <small id='9WOEy'></small><noframes id='9WOEy'>

      <i id='9WOEy'><tr id='9WOEy'><dt id='9WOEy'><q id='9WOEy'><span id='9WOEy'><b id='9WOEy'><form id='9WOEy'><ins id='9WOEy'></ins><ul id='9WOEy'></ul><sub id='9WOEy'></sub></form><legend id='9WOEy'></legend><bdo id='9WOEy'><pre id='9WOEy'><center id='9WOEy'></center></pre></bdo></b><th id='9WOEy'></th></span></q></dt></tr></i><div id='9WOEy'><tfoot id='9WOEy'></tfoot><dl id='9WOEy'><fieldset id='9WOEy'></fieldset></dl></div>

      <tfoot id='9WOEy'></tfoot>

        树莓派工具链上的 std::shared_future

        std::shared_future on Raspberry Pi toolchain(树莓派工具链上的 std::shared_future)

          <small id='7tqp4'></small><noframes id='7tqp4'>

          1. <i id='7tqp4'><tr id='7tqp4'><dt id='7tqp4'><q id='7tqp4'><span id='7tqp4'><b id='7tqp4'><form id='7tqp4'><ins id='7tqp4'></ins><ul id='7tqp4'></ul><sub id='7tqp4'></sub></form><legend id='7tqp4'></legend><bdo id='7tqp4'><pre id='7tqp4'><center id='7tqp4'></center></pre></bdo></b><th id='7tqp4'></th></span></q></dt></tr></i><div id='7tqp4'><tfoot id='7tqp4'></tfoot><dl id='7tqp4'><fieldset id='7tqp4'></fieldset></dl></div>
              <tbody id='7tqp4'></tbody>
            <tfoot id='7tqp4'></tfoot>
              <bdo id='7tqp4'></bdo><ul id='7tqp4'></ul>

                1. <legend id='7tqp4'><style id='7tqp4'><dir id='7tqp4'><q id='7tqp4'></q></dir></style></legend>
                2. 本文介绍了树莓派工具链上的 std::shared_future的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试为 Raspberry Pi 交叉编译一个大型项目.我正在使用由 crosstool-ng,gcc 版本 4.7.3 构建的工具链.编译在看到 std::shared_future 时会窒息.我收到此错误:

                  I'm trying to cross-compile a large project for the Raspberry Pi. I'm using a toolchain built by crosstool-ng, gcc version 4.7.3. The compilation chokes when it sees std::shared_future. I get this error:

                  test.cpp:5:27: error: aggregate 'std::shared_future<int> xxx' has incomplete type and cannot be defined
                  

                  这是产生该错误的源文件:

                  And here's the source file that generates that error:

                  #include <future>
                  
                  int main()
                  {
                    std::shared_future<int> xxx;
                    return 0;
                  }
                  

                  同样的源文件在 Rapsberry Pi 本身上编译成功.这是交叉工具工具链中的错误吗?有解决方法吗?我怎样才能让它成功编译?

                  This same source file compiles successfully on the Rapsberry Pi itself. Is this a bug in the crosstool toolchain? Is there a workaround? How can I get this to successfully compile?

                  推荐答案

                  我在 @backlash 和 Freenode 上 #gcc 上的人的帮助下解决了这个问题.Crosstool-NG 正在为 armv7 构建工具链,而 Raspberry Pi 的编译器正在为 armv6 编译.将架构级别"(目标选项 > 架构级别)更改为 armv6 允许我编译我原始问题中发布的示例代码.此选项将 --with-arch=armv6 添加到 gcc 的配置标志.希望这对将来有人有所帮助.

                  I solved this problem with help from @backlash and the people on #gcc on Freenode. Crosstool-NG was building the toolchain for armv7, while the Raspberry Pi's compiler was compiling for armv6. Changing the "Architecture level" (Target options > Architecture level) to armv6 allowed me to compile the sample code posted in my original question. This option adds a --with-arch=armv6 to the configure flags for gcc. Hope this helps someone out in the future.

                  这篇关于树莓派工具链上的 std::shared_future的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  C++ stl unordered_map implementation, reference validity(C++ stl unordered_map 实现,参考有效性)
                  C++: Is it possible to use a reference as the value in a map?(C++:是否可以使用引用作为映射中的值?)
                  Where ampersand quot;amp;quot; can be put when passing argument by reference?(其中符号“amp;通过引用传递参数时可以放置吗?)
                  Why can a non-const reference parameter be bound to a temporary object?(为什么可以将非常量引用参数绑定到临时对象?)
                  What is a dangling reference?(什么是悬空引用?)
                  C++ reference changes when push_back new element to std::vector(当 push_back 新元素到 std::vector 时,C++ 引用发生变化)
                  <tfoot id='N97L0'></tfoot>
                    <bdo id='N97L0'></bdo><ul id='N97L0'></ul>
                    • <small id='N97L0'></small><noframes id='N97L0'>

                        <tbody id='N97L0'></tbody>
                    • <i id='N97L0'><tr id='N97L0'><dt id='N97L0'><q id='N97L0'><span id='N97L0'><b id='N97L0'><form id='N97L0'><ins id='N97L0'></ins><ul id='N97L0'></ul><sub id='N97L0'></sub></form><legend id='N97L0'></legend><bdo id='N97L0'><pre id='N97L0'><center id='N97L0'></center></pre></bdo></b><th id='N97L0'></th></span></q></dt></tr></i><div id='N97L0'><tfoot id='N97L0'></tfoot><dl id='N97L0'><fieldset id='N97L0'></fieldset></dl></div>
                      1. <legend id='N97L0'><style id='N97L0'><dir id='N97L0'><q id='N97L0'></q></dir></style></legend>