Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Can't create build target(makefiles)
Can't create build target [message #1785785] Thu, 19 April 2018 19:22 Go to next message
Chris Seddon is currently offline Chris SeddonFriend
Messages: 5
Registered: June 2012
Junior Member
Eclipse CDT Oxygen: created a makefile project and tried to make a build target, but the create build target option is greyed out, so I can't run make. Everything works on the command line. I've got lots of makefile projects with their own makefiles and they build correctly. Seems to be a problem with Oxygen only - no problem with previous versions of Eclipse CDT.
Re: Can't create build target [message #1785791 is a reply to message #1785785] Fri, 20 April 2018 01:28 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Normally, I import existing code into a Makefile project.
File --> Import --> C/C++ --> Existing Code as Makefile Project

How did you create yours?

What exactly do you mean by "make a build target"?
Are you using the Build Targets view?
Or Project --> Build Targets --> Create..?
Or ????


[Updated on: Fri, 20 April 2018 01:43]

Report message to a moderator

Re: Can't create build target [message #1785821 is a reply to message #1785791] Fri, 20 April 2018 09:57 Go to previous messageGo to next message
Chris Seddon is currently offline Chris SeddonFriend
Messages: 5
Registered: June 2012
Junior Member
Yes, I'm using right clicking on the Project and selecting Build Targets and Create is greyed out. After fiddling about and using the makefile on the command line the option has become available, but I still don't know how to get it working for a new project. Also, now that I've created the make target, it appears in the Project Explorer window and not Build window.
Perhaps I'm using the wrong version of CDT for Oxygen - do you know which is the latest?

Upon further investigation there appears to be a problem with the .project file when creating a Makefile Project. The xml needs the following:
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
</buildCommand>
</buildSpec>

and then all is well after the project is closed and then reopened (so that it re-reads the .project file).

[Updated on: Fri, 20 April 2018 23:21]

Report message to a moderator

Re: Can't create build target [message #1785823 is a reply to message #1785791] Fri, 20 April 2018 09:58 Go to previous messageGo to next message
Chris Seddon is currently offline Chris SeddonFriend
Messages: 5
Registered: June 2012
Junior Member
Yes, I'm using right clicking on the Project and selecting Build Targets and Create is greyed out. After fiddling about and using the makefile on the command line the option has become available, but I still don't know how to get it working for a new project. Also, now that I've created the make target, it appears in the Project Explorer window and not Build window.
Perhaps I'm using the wrong version of CDT for Oxygen - do you know which is the latest?
Re: Can't create build target [message #1785839 is a reply to message #1785823] Fri, 20 April 2018 12:34 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
The only time I've seen this is when the project doesn't have a C/C+ flavor (i.e., no .cproject file).
I haven't been able to create a Makefile Project without one using the many ways available.
Which is why I asked how you created the project.
---
TIP: posting is sometimes slow.
Actually, it's the after-post response that is slow.
You should check the forum index in another tab before resending a post.
That will prevent multiple postings.
Previous Topic:Can't create build target
Next Topic:Add folders to navigation
Goto Forum:
  


Current Time: Thu Apr 18 09:39:31 GMT 2024

Powered by FUDForum. Page generated in 0.02085 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top