在Code :: Blocks中检查GCC编译器的版本[关闭]


Answers:


5

运行gcc --version,结果将是这样的:

gcc (GCC) 4.4.0
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

如果这样不起作用,则可能没有PATH正确设置编译器设置(我相信如果在Windows上使用MinGW会很常见),在这种情况下,您可以先在Code :: Blocks中执行以下操作来检查编译器的位置:

  • 菜单栏Settings->Compiler and Debugger
  • 选择 GNU GCC Compiler
  • 选择Toolchain executables标签

然后,使用命令行,移至给定目录,然后移至bin子目录,然后尝试gcc --version从此处运行。


3

通常执行命令

gcc --version

它应该给你这样的结果:

gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.