【问题标题】:Error: Storage class specifiers invalid for parameter declarations错误:存储类说明符对参数声明无效
【发布时间】:2014-03-30 18:51:18
【问题描述】:

当我为 Linux 编译我的程序时,我得到了这个错误:

error: storage class specifiers invalid for parameter declarations

这只发生在 Linux 上,因为它在 Windows 上编译得很好。 代码行是:

int Start(static const char* m_vertexshader, static const char* m_fragmentshader);

如果您需要任何详细信息或信息,请使用 GNU C 编译器 (g++) 询问

【问题讨论】:

  • 认为它需要它,但事实证明它不需要。非常感谢!现在工作:)

标签: c++ linux codeblocks declaration gnu


【解决方案1】:

错误信息很清楚。你可能不会在参数声明中使用关键字static,我不知道你为什么使用它。

【讨论】:

  • 非常感谢,不知道这个,在 VS 2010 上不会发生。:)
  • @Boncy MS VC++ 有许多所谓的“语言扩展”,实际上只是编译器错误。:)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多