Makefile笔记01之error:"No rule to make target 'count_words', needed by '-lfl'. Stop."
来源:互联网 发布:windows源代码谁写的 编辑:程序博客网 时间:2024/05/19 14:51
最近刚开始学Makefile,遇到很多问题。
目前问题正一个个解开,和预想的一样:问题简单,知识没想到!
比如我遇到的第一个问题:
执行如下Makefile文件:
count_words: count_words.o lexer.o -lfl
gcc count_words.o lexer.o -lfl -o count_words
count_words.o: count_words.c
gcc -c count_words.c
lexer.o: lexer.c
gcc -c lexer.c
lexer.c: lexer.l
flex -t lexer.l > lexer.c
make后出现:error:"No rule to make target 'count_words', needed by '-lfl'. Stop."
原因:在Makefile文件中的依赖存在-lfl 执行make时会自动搜寻libfl.a库文件(由flex和bison之类的工具产生)
解决方法:安装flex和bison工具
sudo apt-get install flex
sudo apt-get installbison
阅读全文
0 0
- Makefile笔记01之error:"No rule to make target 'count_words', needed by '-lfl'. Stop."
- make: *** No rule to make target ' ', needed by ' '. Stop.
- Makefile常见错误解析 - make: *** No rule to make target 'test1.o', needed by 'test2'. Stop
- Makefile常见错误解析 - make: *** No rule to make target 'test1.o', needed by 'test2'. Stop
- Makefile常见错误解析 - make: *** No rule to make target 'test1.o', needed by 'test2'. Stop
- Makefile执行过程中出错:make: *** No rule to make target ` ‘, needed by xxx. Stop.
- Makefile执行过程中出错:make: *** No rule to make target ` ‘, needed by xxx. Stop.
- *** No rule to make target `xxx1', needed by `xxx2'. Stop
- error: No rule to make target `XXXX.ui', needed by 'ui_XXX.h' Stop
- Qt错误 No rule to make target needed by 'Makefile'
- Qt错误 No rule to make target needed by 'Makefile'
- QT 编译出现问题:error: No rule to make target '../../xxx.pro', needed by 'Makefile'.
- cocos2dx make ***no rule to make target ....x.cpp needed by obj/..../xx.o .stop
- make: *** No rule to make target `build', needed by `default'. Stop.
- nginx 安装时候报错:make: *** No rule to make target `build', needed by `default'. Stop.
- 【错误】 no rule make target '../new/new_pro',needed by 'Makefile'.stop
- u-boot 編譯時錯誤No rule to make target `hello_world.srec', needed by `all'. Stop
- 解决No “rule to make target `../Database/images/login.png', needed by `debug/qrc_image.cpp'. Stop.”
- 一些重要的连接
- idea列操作快捷键
- 临时对象和局部对象以及函数返回值优化
- TextBox中只能输入数字的几种常用方法(C#)
- 移动端Vin码识别技术发展应用
- Makefile笔记01之error:"No rule to make target 'count_words', needed by '-lfl'. Stop."
- hdu 5975 树状数组原理题(2016ACM/ICPC亚洲区大连站)
- pyhotn3入门基础-7函数
- InnoDB O_DIRECT选项漫谈(二)
- opencv 图像的几何变换
- Centos 7.2 终端退出python
- 在androidstudio中学习kotlin(一)
- oracle-等待事件-详解
- LNK2005符号重定义问题