码迷,mamicode.com
首页 > 其他好文 > 详细

makefile中的缩进

时间:2020-01-30 12:29:23      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:错误   error   fir   fine   今天   ***   target   问题   iss   

今天写makefile中遇到了2个问题。
Makefile missing separator. Stop*** recipe commences before first target. Stop.

问题一: Makefile missing separator. Stop

当出现这种error,一般与Tab缩进有关,makefile要求命令行开头必须用tab键

clean:
    rm *.cpp~    //必须缩进

问题二: recipe commences before first target. Stop

出现这种error是因为命令缺了一个target。

# 错误例子
ifndef src
    @echo "src no define"
endif

# 纠正
ifndef src
warning:
    @echo "src no define"
endif

makefile中的缩进

标签:错误   error   fir   fine   今天   ***   target   问题   iss   

原文地址:https://www.cnblogs.com/friedCoder/p/12242384.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!