简体   繁体   English

在Eclipse中使用其自己的Makefile导入现有的QT C ++项目

[英]Importing Existing QT C++ Project with its own Makefile in Eclipse

I would like to import an C++ GUI Project with its own Makefile in Eclipse. 我想在Eclipse中导入带有其自己的Makefile的C ++ GUI项目。 In the command prompt, everything works fine. 在命令提示符下,一切正常。 But when I import the project, it gives an error 但是当我导入项目时,它给出了一个错误

make all 

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

Would be glad, if you give me an idea where I am going wrong. 如果您能告诉我我要去哪里错了,那将是很高兴的。

Thanks Kiran 谢谢基兰

How did you import the project? 您是如何导入项目的? I have used Eclipse with existing makefile projects a couple of times by creating a new empty makefile project and overriding the location of the project to refer to where the Makefile is present. 我通过创建一个新的空makefile项目并覆盖该项目的位置以引用Makefile所在的位置,将Eclipse与现有的makefile项目一起使用了两次。 It warns that the directory already exists, but it works fine. 它警告该目录已经存在,但是可以正常工作。

Make sure that your Makefile has an "all" target. 确保您的Makefile具有“全部”目标。

A typical all target rule could look like 典型的所有目标规则可能看起来像

all: ../bin/myApplicationName
    @true

You'll probably also want to include a rule for clean if you don't already have one. 如果您还没有干净的规则,那么您可能还想包括一个规则。

clean: 
    @-rm -f ../bin/myApplicationName *.o *.d

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

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