Why is make printing “make: Nothing to be done for `all'.”?

白昼怎懂夜的黑 提交于 2019-11-30 09:46:47

Make works on the base of time stamps. If you alter some of your source files Make compile them and built the image accordingly. If you do not change source file then compiler has nothing to do with your project. make does not work like gcc to compile every time whether new build is needed or not. This is one of many advantages of using make for your project.

  1. make clean and then make again
  2. check for spaces and tabs as per make file format
  3. Verify the Path of the kernel libraries

You should remove space in your Makefile. In makefile, only use tab.

I tested your code again, and it works with tab

Compiler is simply telling you that your code was already compiled and there are no changes in your code (it is up to date), then it does not compile. Is a builtin feature of compilers, if there are no changes in source code file, compilers do not waste time.

Use make clean before to make or modify Hello.c and Build your project.

Try : make clean to delete the executable file (./a.out) and try to compile it again! You may have something change in some fuction and make can't see it

Just in case someone encounters the same problem as me:

Eclipse fails to build correctly when one of your folders has the same name as the executable. If this is the case, no matter what you do, you will always get the "nothing to be done" message. The solution is to rename either the folder or executable. Details can be found here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!