gcc -W 和-W1参数分别是什么意思?

苦逼码农 2016-01-11 01:45:42
-W 和-W1分 分别什么意思?

另外,makefile自身发生变化,make的时候,重新make一次,怎么写?

注意,不是.c .cc .ccp 源码发生变化,是makefile自身变化,我想让其重新编译。

如何书写?


找了很久,似乎没有找到好的方法解决。
...全文
1485 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2016-01-13
  • 打赏
  • 举报
回复
gcc -v --help的输出中有: -W Enable extra warnings
苦逼码农 2016-01-13
  • 打赏
  • 举报
回复
引用 6 楼 zhao4zhong1 的回复:
gcc --help gcc -v --help
找到了 -Wl 中的 l是 link的缩写, 为什么-W 这个参数没有问题,因为: Options starting with -g, -f, -m, -O, -W, or --param are automatically passed on to the various sub-processes invoked by gcc. In order to pass other options on to these processes the -W<letter> options must be used. For bug reporting instructions, please see: 也就说, -W 后面可能为空,没有出错,呵呵,结贴
赵4老师 2016-01-13
  • 打赏
  • 举报
回复
gcc --help gcc -v --help
苦逼码农 2016-01-13
  • 打赏
  • 举报
回复
gcc -W 这个参数。 google都谷歌不到!!
赵4老师 2016-01-11
  • 打赏
  • 举报
回复
搜“跟我一起写makefile”
苦逼码农 2016-01-11
  • 打赏
  • 举报
回复
引用 2 楼 fefe82 的回复:
makefile自身发生变化,make的时候,重新make一次,怎么写? 把 Makefile 加到依赖里面去。
加那个依赖? makefile target:依赖文件 target填写什么?填写all ?还是什么?
fefe82 2016-01-11
  • 打赏
  • 举报
回复
makefile自身发生变化,make的时候,重新make一次,怎么写? 把 Makefile 加到依赖里面去。
忘世麒麟 2016-01-11
  • 打赏
  • 举报
回复
请在控制台上输入:man gcc 回车,然后使用PgDn键翻看你要找的问题。

69,369

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧