简体   繁体   English

尝试构建时,Eclipse CDT不使用我的Makefile。

[英]Eclipse CDT doesn't use my Makefile when I try to build.

I have some source code with a Makefile that builds just fine from the command line. 我有一些带有Makefile的源代码,该文件可以从命令行正常构建。

I followed the eclipse CDT instructions for importing a project with existing sources. 我遵循了Eclipse CDT的说明,使用现有资源导入项目。

I opened the make file, and saw all the makefile targets in the Outline view. 我打开了make文件,并在Outline视图中看到了所有makefile目标。

I right clicked on one, and added it to the "Make Target" tab. 我右键单击一个,然后将其添加到“使目标”选项卡中。

I double clicked it, and the console said it couldn't find that target: 我双击它,控制台表示找不到该目标:

14:24:13 **** Build of configuration Debug for project xxxxxxxxxx ****
make build-modules 
make: *** No rule to make target `build-modules'.  Stop.

Go back to the command line and type "make build-modules" and it works fine. 返回命令行并输入“ make build-modules”,它可以正常工作。

There are no other makefiles in this project. 该项目中没有其他makefile。 I do not know why this is failing like this. 我不知道为什么这样会失败。

1) Create a new project in Eclipse. 1)在Eclipse中创建一个新项目。

2) Import just the files that you already have. 2)仅导入您已经拥有的文件。

3) Click build and make sure that you have clicked inside an open file of the project, that is open in the editor view. 3)单击生成,并确保您已在项目的打开文件中单击,该文件在编辑器视图中已打开。

User had to do also: 用户还必须:

"Import project from Makefile" and that got my targets working. “从Makefile导入项目”使我的目标正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM