Unix makefile 错误:'make:致命错误:不知道如何创建目标'
我有最简单的 makefile:
threads:
gcc threads.c -o threads
但我收到错误:
'make:致命错误:不知道如何创建目标'
知道我做错了什么吗?这可能很简单 - 我在尝试运行它的系统上的 emacs 中制作了 makefile (Unix)
I have the simplest of makefiles:
threads:
gcc threads.c -o threads
but I get the error:
'make: Fatal error: Don't know how to make target'
Any ideas what I am doing wrong? It's probably something simple - I made the makefile in emacs on the system which is trying to run it (Unix)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
第二行有空格而不是制表符吗?我想说的是最常见的基本错误。
Do you have spaces instead of a tab on the second line there? Most common basic make mistake, I'd say.
编辑:
当您收到错误“ake:致命错误......”时,您是否输错了 make,那里出了问题。是否创建线程工作?你需要向我们展示 make 文件,以便我们看看出了什么问题...也许 make 文件的方式不正确,Make 在使用空格和制表符方面非常挑剔,因此请仔细检查。
Edit:
Did you mistype the make as you got the error 'ake: Fatal error....', something is wrong there.Does
make threads
work? You need to show us the make file for us SO'ers to see what is wrong...Perhaps the make file is not in the right way, Make is extremely nitpicky on using spaces and tabs so double check on that.