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

    1. <tfoot id='zynz7'></tfoot>

    2. <small id='zynz7'></small><noframes id='zynz7'>

      使用 cl.exe 进行命令行编译?

      时间:2023-05-23
      • <bdo id='uYfKL'></bdo><ul id='uYfKL'></ul>
      • <tfoot id='uYfKL'></tfoot>

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

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

              <tbody id='uYfKL'></tbody>
                <legend id='uYfKL'><style id='uYfKL'><dir id='uYfKL'><q id='uYfKL'></q></dir></style></legend>

                本文介绍了使用 cl.exe 进行命令行编译?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                限时送ChatGPT账号..

                我试图在不使用 IDE 的情况下使用 Visual Studio Express 2010 C++ 编译器.我在 C:Program Files (x86)Microsoft Visual Studio 10.0VCin 中找到了 cl.exe.但是我有一些困难.首先,当我输入 cl 说程序无法启动,因为您的计算机中缺少 mspdb100.dll"时,它给了我一个警告弹出窗口.

                Am trying to use the Visual Studio Express 2010 C++ compiler without using the IDE. I found cl.exe in C:Program Files (x86)Microsoft Visual Studio 10.0VCin. However am having a few difficulties. Firstly it gave me a warning pop up when i type cl saying 'Program cannot start because mspdb100.dll is missing from your computer.'

                所以我将 C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDE 添加到系统路径,然后再试一次,但这次:

                So i add C:Program Files (x86)Microsoft Visual Studio 10.0Common7IDE to the system path and then try again, but this time:

                致命错误 C1510:无法加载语言资源 clui.dll.

                fatal error C1510: Cannot load language resource clui.dll.

                知道如何解决这个问题以便我可以编译吗?另外,我将如何设置路径,以便我可以从不包含 cl.exe 的解决方案文件夹中键入cl main.cpp"等.目前我必须在 bin 文件夹内.谢谢.

                Any idea how to solve this so i can compile? Also how would i set up the path so i can just type 'cl main.cpp' etc, from within a solution folder that does not contain cl.exe. At the moment i have to be inside bin folder. Thanks.

                推荐答案

                尝试从

                Start->
                    All Programs ->
                        Microsoft Visual Studio 2010 ->
                            Visual Studio Tools ->
                                Visual Studio Command Prompt 2010
                

                或者,您可以通过在命令提示符下运行来设置环境:

                Alternatively, you can set up the environment by running this in a command prompt:

                "c:Program Files (x86)Microsoft Visual Studio 10.0VCvcvarsall.bat" x86
                

                (注意:这将在运行后保留您的环境设置.)

                (note: this will leave your environment set up after running.)

                (注意2:根据需要更改x86.选项为x86ia64amd64x86_amd64, x86_ia64)

                (note2: change x86 as desired. options are x86, ia64, amd64, x86_amd64, x86_ia64)

                从那里您可以运行 cl.exe.如果您希望在运行 cl 时自动完成和撤消此操作,请创建一个包含以下内容的批处理文件:

                From there you can run cl.exe. If you want this to be automatically done and undone whenever you run cl, create a batch file with this content:

                @echo off
                %comspec% /c ""c:Program Files (x86)Microsoft Visual Studio 10.0VCvcvarsall.bat" x86 && cl.exe %*"
                

                (/c 告诉命令提示符在运行此命令后结束会话,以便您的环境恢复正常.)

                (the /c tells the command prompt to end the session after running this command, so your environment returns to normal.)

                从那里,将其命名为 cl.bat.将其放在某个文件夹中,并将该文件夹的路径添加到您的 PATH 环境变量中,确保它位于 cl.exe 的路径之前code>,以便在您键入 cl 而不是 cl.exe

                From there, name it cl.bat. Put this in a folder somewhere, and add the path to that folder to your PATH environment variable, making sure it comes before the path to cl.exe, so that this cl.bat is executed whenever you type cl instead of cl.exe

                我建议你把 cl.bat 放在你的 system32/ 文件夹中,它应该放在 cl.exe 的路径之前默认安装.

                I recommend you just put cl.bat in your system32/ folder, it should come before cl.exe's path on a default installation.

                或者,您可以按任何顺序添加它并始终键入 cl.bat,或将其命名为其他名称,以免混淆.

                Alternatively, you can add it in any order and always type cl.bat, or name it something else so there's no confusion.

                这篇关于使用 cl.exe 进行命令行编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  <tbody id='Q6s6Q'></tbody>

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

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

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