开发者

Why Does GCC Throw Errors About Unspecified Options?

When I run the following command from a makefile on 64-bit Red Hat Enterprise Linux 5.0 using GCC 4.2.3:

gcc -c -ansi -pedantic -O0 -fPIC -I. -I.. -Iheader_files/include "source_file.c"

I get the following error:

cc1: error: unrecognized command line option "-lang-c"

Superficially, the problem is that "-lang-c" is no longer a valid option on newer versions of GCC. However, the deeper question is: Why does GCC receive a "-lang-c" option that wasn't in the original command?

Additional background:

  • The current installation doesn't have any GCC "specs" files that I can find
  • Running "gcc -dumpspecs" produces a long list of defaults, but "-lang-c" isn't among them.
  • "-la开发者_Go百科ng-c" does not appear to be in any environment variables that I know of that influence GCC.

Any help would be appreciated.

Regards,

Mark Biesiada


Make sure that your gcc driver program is the same version as your installed GCC.

Add the -v option to your compile command to check the versions and where the options are coming from.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜