我正在努力让FreeGLUT在OSX上构建,并且遇到了同样问题的许多实例.许多功能仅存在于.c文件中.
这是一个例子
extern void fghRestoreState( void );
static void fghRestoreState( void ){...}
Run Code Online (Sandbox Code Playgroud)
我对C的理解有限,但编译器错误似乎有意义:
src/Common/freeglut_gamemode.c:252: error: static declaration of ‘fghRestoreState’ follows non-static declaration
src/Common/freeglut_gamemode.c:43: error: previous declaration of ‘fghRestoreState’ was here
Run Code Online (Sandbox Code Playgroud)
我的问题是,他们是否有任何理由这样设置?它会在其他平台上正确编译吗?