• <small id='brC82'></small><noframes id='brC82'>

    <legend id='brC82'><style id='brC82'><dir id='brC82'><q id='brC82'></q></dir></style></legend>
    1. <tfoot id='brC82'></tfoot>

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

        MinGW 错误:不存在这样的文件或目录

        时间:2023-10-17
      1. <small id='4htZ5'></small><noframes id='4htZ5'>

          <tbody id='4htZ5'></tbody>
            <bdo id='4htZ5'></bdo><ul id='4htZ5'></ul>
            <legend id='4htZ5'><style id='4htZ5'><dir id='4htZ5'><q id='4htZ5'></q></dir></style></legend>
            • <tfoot id='4htZ5'></tfoot>

                1. <i id='4htZ5'><tr id='4htZ5'><dt id='4htZ5'><q id='4htZ5'><span id='4htZ5'><b id='4htZ5'><form id='4htZ5'><ins id='4htZ5'></ins><ul id='4htZ5'></ul><sub id='4htZ5'></sub></form><legend id='4htZ5'></legend><bdo id='4htZ5'><pre id='4htZ5'><center id='4htZ5'></center></pre></bdo></b><th id='4htZ5'></th></span></q></dt></tr></i><div id='4htZ5'><tfoot id='4htZ5'></tfoot><dl id='4htZ5'><fieldset id='4htZ5'></fieldset></dl></div>
                  本文介绍了MinGW 错误:不存在这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 Windows XP SP3 上运行 MinGW.我用 C++ 编写了一个简单的程序并将其保存为 .cpp 文件.当我尝试在正确目录下的 MinGW 中编译它时,出现一条消息说错误:不存在这样的文件或目录"但我知道它在正确的目录中.

                  I'm running MinGW on windows XP SP3. I wrote a simple program in C++ and saved it as a .cpp file. When I tried to compile it in MinGW at the correct directory a message appeared saying " Error: No such file or directory exists" but I know its in the correct directory.

                  这是我在 MinGW 中输入的内容

                  This is what I typed into MinGW

                  cd C:MinGW test  # Where I saved the .cpp file
                  g++ test.cpp -o test.exe
                  

                  之后出现错误.

                  我也确实将环境设置路径更改为 C:MinGWin

                  Also I did change the Environment Settings path to C:MinGWin

                  推荐答案

                  要使其工作,您应该从程序所在的文件夹运行编译器,而不是 MinGW 所在的文件夹.首先,您需要设置 PATH 以包含 MinGW.您可以使用 set PATH = C:MinGWin;%PATH% 在命令行上执行此操作.

                  To get it to work, you should run the compiler from the folder where the program is, not where MinGW is. First, you need to set your PATH to include MinGW. You can do this with set PATH = C:MinGWin;%PATH% on the command line.

                  然后,cd到程序所在的位置,运行g++ test.cpp -o test.exe编译,test到运行.

                  Then, cd to where the program is located and run g++ test.cpp -o test.exe to compile, and test to run.

                  希望这有帮助!

                  这篇关于MinGW 错误:不存在这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:不应该 decltype 触发其参数的编译吗? 下一篇:模板:使用前向声明来减少编译时间?

                  相关文章

                  1. <small id='qDIDV'></small><noframes id='qDIDV'>

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

                      <tfoot id='qDIDV'></tfoot>
                      • <bdo id='qDIDV'></bdo><ul id='qDIDV'></ul>
                      <legend id='qDIDV'><style id='qDIDV'><dir id='qDIDV'><q id='qDIDV'></q></dir></style></legend>