Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse-CDT and Makefiles(Makefiles)
icon5.gif  Eclipse-CDT and Makefiles [message #1007635] Wed, 06 February 2013 20:01 Go to next message
Stan Rosenbaum is currently offline Stan RosenbaumFriend
Messages: 1
Registered: February 2013
Junior Member

Hello All,

I am hoping someone can clear up some serious confusion this newbie has about Eclipse-CDT and makefiles.

Yes, I have read the help files, and searched the internet and I just cannot find a clear answer.

This is what I understand. In Eclipse-CDT you can 2 types of projects, a managed makefile project [in which eclipse takes care of making a makefile and then building from it transparently in the background when you it build or debug. Or you can have a project in which you manual make the makefile yourself.

[Let me know if I got that correct.]

Now, I am fine with eclipse taking care of that itself but is there anyway to see the actually makefile it generates?'I I am just curious to see what is makes compares to something i make, for my own edification.

Second, I am totally confused about manual makefile projects.

If I create a makefile itself, I totally do not see how you tell eclipse how to use your own makefile verses what it does transparently. I mean frist, I have to create the Makefile file, which seems odd, because I just eclipse "Hey I am going to take care of the makefile myself" you think it would have made an initial makefile to get me started. But I import a makefile my targets in that existing makefile do not show up in the in run configuration, and they usually do not even show up in the make targets window. But then I discover, I can't use the run/debug configuration button to create a new target, there is that separate right-click contextual menu in the project for 'Make Target'. But then if I make a target, that target is not associated with the build configurations.

I am really confused about the two processes, and the documentation really isn't that clear enough in my opinion on explaining the differences or best practices with each, so could someone enlighten me?

Stan
Re: Eclipse-CDT and Makefiles [message #1010499 is a reply to message #1007635] Sun, 17 February 2013 13:43 Go to previous messageGo to next message
Dmitry Kolomiets is currently offline Dmitry KolomietsFriend
Messages: 1
Registered: February 2013
Junior Member
+1 to Stan's question.

I have a project which I need to compile with different compilers (Microsoft C++, Intel C++, GNU C++) on different platforms (currently Windows 32/64, different versions of Linux 32/64). The only way I could manage this is via hand-written makefile (using command lines like this: make rel prj=project.mk dir=rel_vc_64 os=w64 comp=ms cpu=sse3 opt=fast vec=on fp=safe diag=normal checks=light)

I manually crate a targets in eclipse where I put all the configurations I need.
As a result I have something like this:
index.php/fa/13457/0/

Having that I freely compile what I need, but that approach disables you from managing your configuration from eclipse, and CDT becomes just an editor (good editor). Particularly, when I add/remove source files into the project I need to add them into the list in the makefile manually.

I would really appreciate if somebody could share the experiences on cratering a cross platform projects which checks out in eclipse (I use svn plugin for that - subversive, it's very cool) and works (compiles and can be debugged) on all platform.

As I currently have problems with making platform-independent project (at least while eclipse uses some absolute paths) and debugging is a problem when using something other than GCC.
  • Attachment: targets.png
    (Size: 7.51KB, Downloaded 2561 times)
Re: Eclipse-CDT and Makefiles [message #1010747 is a reply to message #1010499] Mon, 18 February 2013 07:07 Go to previous messageGo to next message
Sebastian Wagner is currently offline Sebastian WagnerFriend
Messages: 13
Registered: June 2010
Junior Member
... to your question how to build one software for different targets.

The toolchain you use for the build (compiler, linker...) can be set specific for each configuration you create. You can change this in the project settings -> Tool Chain Editor.
I didn't used it that way, but that should allow to build for different targets if you have different toolchain. Otherwise you can set the tool options separately for each config.
Re: Eclipse-CDT and Makefiles [message #1012007 is a reply to message #1007635] Wed, 20 February 2013 17:20 Go to previous message
Ken Whatmough is currently offline Ken WhatmoughFriend
Messages: 1
Registered: February 2013
Junior Member
Stan Rosenbaum wrote on Wed, 06 February 2013 15:01

But then I discover, I can't use the run/debug configuration button to create a new target, there is that separate right-click contextual menu in the project for 'Make Target'. But then if I make a target, that target is not associated with the build configurations.

I am having the same issue trying to Run/Debug the output of a manual makefile project in Eclipse. In fact, Eclipse looses my launch configuration every time I try to save it. When I go back into the project settings after saving it, the list of launch configurations is empty again! Does anyone know what's going on here?
Thanks!
Previous Topic:running gdb as root without running eclipse as root
Next Topic:"Paths and Symbols > Include" not available
Goto Forum:
  


Current Time: Fri Mar 29 05:40:39 GMT 2024

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

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

Back to the top