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

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

      <legend id='J7FEA'><style id='J7FEA'><dir id='J7FEA'><q id='J7FEA'></q></dir></style></legend>
    1. 首次编译错误时自动停止 Visual C++ 2008 构建?

      Automatically stop Visual C++ 2008 build at first compile error?(首次编译错误时自动停止 Visual C++ 2008 构建?)

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

            <tfoot id='PVfBh'></tfoot>
            <legend id='PVfBh'><style id='PVfBh'><dir id='PVfBh'><q id='PVfBh'></q></dir></style></legend>

                <tbody id='PVfBh'></tbody>

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

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

                本文介绍了首次编译错误时自动停止 Visual C++ 2008 构建?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我知道我可以编译单个源文件,但有时——比如,当编辑一个被许多 .cpp 文件使用的头文件时——需要重新编译多个源文件.这就是 Build 的用途.

                I know I can compile individual source files, but sometimes -- say, when editing a header file used by many .cpp files -- multiple source files need to be recompiled. That's what Build is for.

                VC9 (Visual C++ 2008) 中Build"命令的默认行为是尝试编译所有需要它的文件.有时这只会导致许多失败的编译.我通常只是观察错误并按 ctrl-break 手动停止构建.

                Default behavior of the "Build" command in VC9 (Visual C++ 2008) is to attempt to compile all files that need it. Sometimes this just results in many failed compiles. I usually just watch for errors and hit ctrl-break to stop the build manually.

                有没有办法配置它,使构建在第一次编译错误(不是第一个失败的项目构建)时自动停止?

                Is there a way to configure it such the build stops at the very first compile error (not the first failed project build) automatically?

                推荐答案

                我想出了一个更好的宏家伙.它在第一个错误/秒后立即停止(更新构建窗口后立即停止).

                I came up with a better macro guys. It stops immediately after the first error/s (soon as build window is updated).

                Visual Studio -> 工具 -> 宏 -> 宏 IDE...(或 ALT+F11)

                Visual Studio -> Tools -> Macros -> Macro IDE... (or ALT+F11)

                Private Sub OutputWindowEvents_OnPaneUpdated(ByVal pPane As OutputWindowPane) Handles OutputWindowEvents.PaneUpdated
                    If Not (pPane.Name = "Build") Then Exit Sub
                
                    pPane.TextDocument.Selection.SelectAll()
                    Dim Context As String = pPane.TextDocument.Selection.Text
                    pPane.TextDocument.Selection.EndOfDocument()
                
                    Dim found As Integer = Context.IndexOf(": error ")
                
                    If found > 0 Then
                        DTE.ExecuteCommand("Build.Cancel")
                    End If
                
                End Sub 
                

                希望对你们有用.

                这篇关于首次编译错误时自动停止 Visual C++ 2008 构建?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                Consistent pseudo-random numbers across platforms(跨平台一致的伪随机数)
                Vary range of uniform_int_distribution(改变uniform_int_distribution的范围)
                What is a seed in terms of generating a random number?(就生成随机数而言,种子是什么?)
                Is 1.0 a valid output from std::generate_canonical?(1.0 是 std::generate_canonical 的有效输出吗?)
                Getting big random numbers in C/C++(在 C/C++ 中获取大随机数)
                What is the best way to generate random numbers in C++?(在 C++ 中生成随机数的最佳方法是什么?)
              1. <i id='RrNyO'><tr id='RrNyO'><dt id='RrNyO'><q id='RrNyO'><span id='RrNyO'><b id='RrNyO'><form id='RrNyO'><ins id='RrNyO'></ins><ul id='RrNyO'></ul><sub id='RrNyO'></sub></form><legend id='RrNyO'></legend><bdo id='RrNyO'><pre id='RrNyO'><center id='RrNyO'></center></pre></bdo></b><th id='RrNyO'></th></span></q></dt></tr></i><div id='RrNyO'><tfoot id='RrNyO'></tfoot><dl id='RrNyO'><fieldset id='RrNyO'></fieldset></dl></div>

                      <tbody id='RrNyO'></tbody>

                        • <bdo id='RrNyO'></bdo><ul id='RrNyO'></ul>
                        • <tfoot id='RrNyO'></tfoot>

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

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