• <legend id='RND3H'><style id='RND3H'><dir id='RND3H'><q id='RND3H'></q></dir></style></legend>
  • <small id='RND3H'></small><noframes id='RND3H'>

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

      1. <tfoot id='RND3H'></tfoot>
          <bdo id='RND3H'></bdo><ul id='RND3H'></ul>

      2. 缺少 C++ 头文件 &lt;__debug&gt;更新 OSX 命令行工具 6.3 后

        时间:2024-05-11
        <i id='KE75l'><tr id='KE75l'><dt id='KE75l'><q id='KE75l'><span id='KE75l'><b id='KE75l'><form id='KE75l'><ins id='KE75l'></ins><ul id='KE75l'></ul><sub id='KE75l'></sub></form><legend id='KE75l'></legend><bdo id='KE75l'><pre id='KE75l'><center id='KE75l'></center></pre></bdo></b><th id='KE75l'></th></span></q></dt></tr></i><div id='KE75l'><tfoot id='KE75l'></tfoot><dl id='KE75l'><fieldset id='KE75l'></fieldset></dl></div>
            <tbody id='KE75l'></tbody>

          • <tfoot id='KE75l'></tfoot>
          • <legend id='KE75l'><style id='KE75l'><dir id='KE75l'><q id='KE75l'></q></dir></style></legend>

              <small id='KE75l'></small><noframes id='KE75l'>

              • <bdo id='KE75l'></bdo><ul id='KE75l'></ul>
                  本文介绍了缺少 C++ 头文件 &lt;__debug&gt;更新 OSX 命令行工具 6.3 后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  从 App Store 更新到命令行工具 6.3 后,包括 在内的程序将导致文件未发现错误如下.cpp 没有什么有趣的,但包含在包含的标题之一中.

                  After updating to Command Line Tools 6.3 from the App Store, programs including <vector> or <iterator> which internally include <__debug> will cause file not found error as follows. The cpp is nothing interesting but includes in one of the included headers.

                  c++ -O3 -I/Users/farleylai/Documents/dev/git/ESMS/Optimizer/../StreamIt/src/cluster/headers -L/Users/farleylai/Documents/dev/git/ESMS/Optimizer/../StreamIt/build/binaries/clusterStaticLibrary /Users/farleylai/Documents/dev/git/ESMS/Optimizer/build/StreamIt/FIR/511/512/combined_threads.cpp -o streamit -lcluster -lpthread -lstdc++
                  In file included from /Users/farleylai/Documents/dev/git/ESMS/Optimizer/build/StreamIt/FIR/511/512/combined_threads.cpp:9:
                  In file included from /Users/farleylai/Documents/dev/git/ESMS/Optimizer/../StreamIt/src/cluster/headers/node_server.h:22:
                  In file included from /Users/farleylai/Documents/dev/git/ESMS/Optimizer/../StreamIt/src/cluster/headers/thread_info.h:20:
                  In file included from /Users/farleylai/Documents/dev/git/ESMS/Optimizer/../StreamIt/src/cluster/headers/connection_info.h:19:
                  /Users/farleylai/Documents/dev/git/ESMS/Optimizer/../StreamIt/src/cluster/headers/socket_holder.h:43:25: warning: delete called on 'mysocket' that is abstract but has non-virtual destructor
                        [-Wdelete-non-virtual-dtor]
                      if (!is_mem_socket) delete sock;
                                          ^
                  In file included from /Users/farleylai/Documents/dev/git/ESMS/Optimizer/build/StreamIt/FIR/511/512/combined_threads.cpp:9:
                  In file included from /Users/farleylai/Documents/dev/git/ESMS/Optimizer/../StreamIt/src/cluster/headers/node_server.h:22:
                  In file included from /Users/farleylai/Documents/dev/git/ESMS/Optimizer/../StreamIt/src/cluster/headers/thread_info.h:26:
                  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/vector:265:
                  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__bit_reference:15:
                  /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:641:10: fatal error: '__debug' file not found
                  #include <__debug>
                           ^
                  

                  有什么办法可以解决这个问题吗?我不希望指定任何额外的 C++ 标志.

                  Any ideas to fix this? I don't expect to specify any additional C++ flags.

                  谢谢.

                  PS:OSX 10.10.3 上的 MacBook pro

                  PS: MacBook pro on OSX 10.10.3

                  更新:

                  该问题已由 Apple 在其开发者论坛上验证.在命令行工具 6.2 中,__debug 的包含有条件地保护如下,但在 6.3 中没有.

                  The issue is verified by Apple on their developer's forum. In Command Line Tools 6.2, the inclusion of __debug is conditionally guarded as follows but not in 6.3.

                  #ifdef _LIBCPP_DEBUG
                  #   include <__debug>
                  #else
                  #   define _LIBCPP_ASSERT(x, m) ((void)0)
                  #endif
                  

                  和 libcxx 人讨论了移除 __debug 的守卫 这里.感觉 __debug 在 OSX 上从来不存在.

                  And libcxx people talked about removing the guards of __debug here. It feels like __debug never exists on OSX.

                  推荐答案

                  通过 6.2.action#">Apple 的开发者下载页面.

                  Downgrade the Command Line Tools to 6.2 via Apple's Developer Download Page.

                  请注意为您的 OS X 下载正确的版本:

                  Be careful to download the correct version for your OS X:

                  • OS X 10.10 commandlinetoolsosx10.10forxcode6.2.dmg
                  • OS X 10.9 commandlinetoolsosx10.9forxcode6.2.dmg

                  这是可行的,因为 __debug 的包含在命令行工具 6.2 中有条件地受到保护,如下所示,但在 6.3 中则不然.

                  This works because the inclusion of __debug is conditionally guarded as follows in Command Line Tools 6.2 but not in 6.3.

                  #ifdef _LIBCPP_DEBUG
                  #   include <__debug>
                  #else
                  #   define _LIBCPP_ASSERT(x, m) ((void)0)
                  #endif
                  

                  我认为这是最安全的方法,因为:

                  In my opinion this is the safest way, because:

                  1. 您不会损害您的工具链
                  2. Apple 修复问题后,您可以通过 App Store 轻松升级
                  3. 如果您手动添加文件,则必须稍后将其删除,否则可能会出现更多问题

                  更新 - 21.04.2015

                  问题已修复,由 Apple 解决.安装命令行工具 6.3.1 后,一切正常!

                  Problem fixed by Apple. After installing Command Line Tools 6.3.1 everything works as expected!

                  这篇关于缺少 C++ 头文件 &lt;__debug&gt;更新 OSX 命令行工具 6.3 后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:复制 std::vector:更喜欢赋值还是 std::copy? 下一篇:“适当"用 C++/STL 存储二进制数据的方法

                  相关文章

                    <bdo id='Iexsf'></bdo><ul id='Iexsf'></ul>

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

                    <legend id='Iexsf'><style id='Iexsf'><dir id='Iexsf'><q id='Iexsf'></q></dir></style></legend>

                    <small id='Iexsf'></small><noframes id='Iexsf'>