make:***没有规则使目标'全部'。停止。 Eclipse错误 [英] make: *** No rule to make target `all'. Stop. Eclipse error

查看:550
本文介绍了make:***没有规则使目标'全部'。停止。 Eclipse错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚下载了适用于Windows的Eclipse CDT开发工具包(87MB)。我也安装了MinGW和msys。
我也把它添加到PATH:C:\msys\1.0\bin; C:\mingw\bin。并在此之后重新启动计算机。我已经通过cmd中的make -version类型进行了检查,它可以工作。



然而,由于某种原因我无法编译C项目。我不会得到二进制文件,只有以下东西在COnsole中:

  ****构建配置默认为项目XXX **** 

使所有
make:***没有规则使目标全部。停止。

有人可以帮我吗?

解决方案

为了将来参考,如果您要使用makefile导入现有项目...



如果您的makefile没有全部规则,则此消息仍将弹出。使用自动生成Makefile选项应该自动处理。如果您不想为您制作makefile,则至少有3个简单选项...



选项1



如果您不希望使用该名称的规则,请使用twokats的解决方案。以下是一个说明。


  1. 转到项目属性 - > C / C ++ Build - >行为选项卡

  2. <从Build(Incremental Build)文本框中删除all。

这让Eclipse知道你没有尝试使用一个名为all的make目标。由于某种原因,这是默认值。



选项2



类似于Etiennebr的makefile。请注意, all:$(TARGET)行是Eclipse正在抱怨的规则,找不到。



选项3



使用您选择的规则名称替换all,并确保将该规则包含在makefile中。 p>

I've just downloaded Eclipse CDT developer kit (87MB) for Windows. I've also installed MinGW, and msys. I also added this to PATH: C:\msys\1.0\bin;C:\mingw\bin. and restarted computer after that. I've checked by type "make --version" in cmd and it works.

However, for some reason I cannot compile my C project. I don't get binary files and got only the following things in COnsole:

**** Build of configuration Default for project XXX ****

make all 
make: *** No rule to make target `all'.  Stop.

Could some one help me with this please?

解决方案

For future reference, if you're trying to import an existing project with a makefile...

This message will still pop up if your makefile doesn't have an "all" rule. Using the "Generate Makefiles automatically" option should take care of this automatically. If you don't want makefiles made for you, you have at least 3 simple options...

Option 1

If you don't want to use a rule by that name, use twokats' solution. Here's a clarification.

  1. Go to Project Properties -> C/C++ Build -> Behaviour Tab.
  2. Leave Build (Incremental Build) Checked.
  3. Remove "all" from the text box next to Build (Incremental Build).

This lets Eclipse know you aren't trying to use a make target called "all". For some reason, that is the default.

Option 2

Use something similar to Etiennebr's makefile. Note, the all: $(TARGET) line is the rule that Eclipse is complaining it can't find.

Option 3

Substitute "all" with a rule name of your choice, and be sure to include that rule in your makefile.

这篇关于make:***没有规则使目标'全部'。停止。 Eclipse错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆