当前位置:网站首页>Makefile missing separator. Stop.怎么解决「建议收藏」
Makefile missing separator. Stop.怎么解决「建议收藏」
2022-08-10 12:52:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
- 现象
在makefile中写入:
all: clean comp
clean:
./clean.csh
comp:
./run_tc
命令行的背景显示为红色。
运行makefile 提示:makefile 3 missing separator.stop:
检查了一番发现,有几个原因会引起这样的结果:
第一:makefile的命令行,开头必须用tab键,目前没有发现tabstop的设定值的不同,会引起error。例如:
set tabstop=3(默认) OR set tabstop=4等,均可以。
第二:编码方式引起的原因。这个原因不多见,不容易发现。查看/etc/vimrc文件以及~/.vimrc,查看是否有set fileencodings的选项,是否设定了utf-8。没有的话加上。
***********************************************************************************************
- 扩展
*************************************************************************************************
Makefile missing separator. Stop.如何解决 Makefile:1: *** missing separator. Stop. makefile 如下
makefile missing?separator? stop makefile常见错误
[解决办法]
这个makefile里不要乱用TAB,只有命令所在的行才能且只能以TAB开头!
其他的如,make变量的定义、赋值,make内定函数如$(error "strings")都不能以TAB开头,不然make会将其作为命令来处理!
[解决办法]
1.第一行ifnep这个符号是做什么的?大概是ifneq吧?
2.很多地方你打的是空格,你最好尝试习惯去用tab键
3.第八行和第十行必须用tab开头
ifneq ($(KERNELRELEASE),)
obj-m += module.o
else
PWD := $(shell pwd)
KVER := $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
all:
$(MAKE) -C $(KDIR) M= $(PWD)
clean:
rm -rf *.o *.mod.c *.ko *.symvers *.order *.makers
endif
[解决办法]
如果排除了TAB用空格代替的问题后、以及由中文“:”等问题后,问题还存在
那么很可能是文件编码格式的问题
查看一下Makefile 文件编码格式是不是utf-8的,还带有BOM标记在文件头
$ xxd -l 16 Makefile
0000000: efbb bf61 6c6c 3a0a 2020 6563 686f 2068 ...all:.
去掉红色字体部分就OK了
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/129978.html原文链接:https://javaforall.cn
边栏推荐
- Digicert EV证书签名后出现“证书对于请求用法无效”的解决方案
- 娄底妆品实验室建设规划构思
- 想通这点,治好 AI 打工人的精神内耗
- 【黑马早报】雷军称低谷期曾想转行开酒吧;拜登正式签署芯片法案;软银二季度巨亏230亿美元;北京市消协约谈每日优鲜...
- shell:常用小工具(sort、uniq、tr、cut)
- 浙大、阿里提出DictBERT,字典描述知识增强的预训练语言模型
- mSystems | Zhongnong Wang Jie Group Reveals the Mechanisms Affecting Soil "Plastic Interstitial" Microbial Communities
- Wirshark common operations and tcp three-way handshake process example analysis
- Codeforces Round #276 (Div. 1) D. Kindergarten
- LeetCode中等题之比较版本号
猜你喜欢
M²BEV: Multi-Camera Joint 3D Detection and Segmentation with Unified Bird’s-Eye View Representation
Jiugongge lottery animation
燃炸!字节跳动成功上岸,只因刷爆LeetCode算法面试题
Blast!ByteDance successfully landed, only because the interview questions of LeetCode algorithm were exhausted
Comparison version number of middle questions in LeetCode
How to describe multiple paragraphs with different font settings in Open Office XML format
神经网络可视化有3D版本了,美到沦陷!(已开源)
【目标检测】小脚本:提取训练集图片与标签并更新索引
SenseTime self-developed robotic arm, the first product is an AI chess-playing robot: Guo Jingjing is also invited as an endorsement
中科院深圳先进技术院合成所赵国屏院士组2022年招聘启事
随机推荐
【ECCV 2022|Millions of Prizes】PSG Competition: Pursuing the "Most Comprehensive" Scene Understanding
BEVDet4D: Exploit Temporal Cues in Multi-camera 3D Object Detection Paper Notes
Open Office XML 格式里如何描述多段具有不同字体设置的段落
WebView的优化与常见问题解决方案
教育Codeforces轮41(额定Div。2)大肠Tufurama
The recursive recursive Fighting_ silver study ah but level 4
LeetCode medium topic search of two-dimensional matrix
中科院深圳先进技术院合成所赵国屏院士组2022年招聘启事
【学习笔记】Redis的持久化
Efficient and Robust 2D-to-BEV Representation Learning via Geometry-guided Kernel Transformer 论文笔记
娄底石油化工实验设计、建设规划概述
【量化交易行情不够快?】一文搞定通过Win10 wsl2 +Ubuntu+redis+pickle实现股票行情极速读写
鸿蒙开发从hello world开始
G1和CMS的三色标记法及漏标问题
Solution for "Certificate not valid for requested usage" after Digicert EV certificate signing
C# 当前上下文中不存在InitializeComponent()
神了!阿里数据库专家纯手写了这份604页的Oracle+MySQL攻坚指南
一文详解 implementation api embed
DNS欺骗-教程详解
NodeJs原理 - Stream(二)