代码块,添加了环境变量路径,但在安装文件夹之外出现 g++ 错误

CodeBlocks, environment variables path added, but g++ error outside the installation folder?

本文关键字:文件夹 外出 g++ 错误 安装 添加 环境变量 代码 路径      更新时间:2023-10-16

我刚刚安装了CodeBlocks来编译c ++程序,安装它的路径是,

      C:Program FilesCodeBlocksMinGWbin

我还将此路径添加到环境变量路径中,

g++ 命令在此文件夹内的命令提示符下工作正常,

     g++: fatal error: no input files
          compilation terminated

但是当我在这个文件夹之外给出 g++ 命令时,它给了我一个错误,

     'g++' is not recognized as an external or internal command,
        operable program or batch file

我的问题是,为什么即使我添加了环境变量的路径,我也会收到此错误?

您可能添加了错误的路径。