更新时间:2023-11-13 15:34:10
gcc有一个选项来提醒你一下:
gcc has an option to warn you about this:
gcc -Wmissing-prototypes
您可以关闭该警告变成了错误,停止编译和力量的人来解决它:
You can turn this warning into an error to stop compilation and force people to fix it:
gcc -Werror=missing-prototypes
如果你只是想列出它,你可以用 GCC
选项 -Wmissing的原型
和grep的编译否previous原型在日志中。
If you just want to list it you can compile with the gcc
option -Wmissing-prototypes
and grep for no previous prototype for in the log.
基于编辑更新
既然你现在提到,你不能用gcc,你必须找到你当前的编译器的类似选项。大多数编译器有这样一个选项。先从手册页或内置的帮助输出。
Since you now mention that you can't use gcc, you'll have to find a similar option for your current compiler. Most compilers have such an option. Start with the man page or the built in help output.