我有一个包含以下代码的制作文件:
all: main.o Etudiant.o gcc -lobjc -o program main.o Etudiant.o main.o:main.m Etudiant.h gcc -c main.m Etudiant.o:Etudiant.m Etudiant.h gcc -c Etudiant.m当我在shell命令中编写此代码时:
$make我知道了:
make: **** No targets specified and no makefile found. Stop.我该如何解决?
解决方案Mmm ... makefiles.呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜
该行开头的所有空白.那必须是制表符.否则,Make会掩盖一个真正晦涩的错误.确保这些是标签页,然后重试.
请参阅键盘左侧标记为选项卡"的按钮.删除空格并单击一次以插入制表符.
尝试make all. IIRC(自从我不得不处理makefile以来已经有几年了),大多数make将默认为all,但也许不是.
扩展名无关紧要.
天哪!我们都是额外的密集人群(大多数都是@bbum)!未找到Makefile"的意思是……好吧,Make甚至都没有看到makefile.将Makefile.m重命名为Makefile的建议是正确的.同样,整个制表符与空格之间的关系当然也很重要.
I have a make file that contains this code:
all: main.o Etudiant.o gcc -lobjc -o program main.o Etudiant.o main.o:main.m Etudiant.h gcc -c main.m Etudiant.o:Etudiant.m Etudiant.h gcc -c Etudiant.mWhen I write this in the shell command:
$makeI got this:
make: **** No targets specified and no makefile found. Stop.How do I fix this?
解决方案Mmm... makefiles. Whee.
All that whitespace at the beginning of the line. That has to be tabs. Or Make will barf up a really obscure error. Make sure those are tabs and try again.
See the button on the left side of the keyboard labeled "tab". Delete the spaces and hit that once to insert a tab character.
Try make all. IIRC (been a few years since I've had to muck with makefiles) most makes will default to all, but maybe yours isn't.
Extension doesn't matter.
Holy Heck! We are all Extra Dense(@bbum mostly so)!"no Makefile found" means... well.. that Make didn't even see the makefile. The suggestions to rename the Makefile.m to Makefile are correct. As well, the whole tab vs. whitespace thing is certainly pertinent.
更多推荐
没有指定目标,也没有找到makefile
发布评论