Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Managed Make multiple targets Q
Managed Make multiple targets Q [message #127601] Wed, 17 November 2004 16:06 Go to next message
Eclipse UserFriend
I have a (beginner) question about Managed Make projects.

I have an existing large project that contains multiple directories that
need to be build as shared libraries and several executable targets that
use them.

It would be easiest to have these as a single project, as they share many
of the same external includes and libraries.

It is possible (and how - since I've failed to figure it out) to have a
managed
Make project that has multiple targets, some being shared libraries and
some executables?

I'm running under Linux with fairly standard g++ toolchain. Currently,
the project uses boost-build (which I think better), but it will be easier
for users if I move to good-'ol make. I thought it would be a good idea
to make that move in conjunction with my move to Eclipse/CDT. (I've grown
fond of Eclipse through several Java & C# based projects).

I couldn't find my answer in the newsgroup history or in the guide/FAQ etc.
Thanks,
-David.
Re: Managed Make multiple targets Q [message #873155 is a reply to message #127601] Thu, 17 May 2012 11:52 Go to previous messageGo to next message
Eclipse UserFriend
I realize this is an old topic, but I'm also a n00b in the same boat.

How do I set up multiple targets for a managed CDT project?

It looks like the build command automatically slurps all the existing code and uses it for one target, is this right?

Any help would be greatly appreciated.

-Fred
Re: Managed Make multiple targets Q [message #873705 is a reply to message #873155] Fri, 18 May 2012 18:22 Go to previous message
Eclipse UserFriend
Okay, I can partially answer my own question.

With a managed build project, you can specify multiple build configurations from the properties dialog.

For a given build configuration you can specify whether it's a dynamic library, static library or executable (under "C/C++ Build -> Settings -> Build Artifact" tab).

By default, all the source code in the project is slurped into the current build. You can exclude a source file by right clicking on it and selecting "resource configuration -> exclude from build".

Note nearly all the configurations in the "C/C++ Build" and "C/C++ General" or tied to the selected build configuration at the top of the dialog box.

You can add references so that a static library must be built before the executable that requires it under "C/C++ General -> Paths and Symbols -> References" tab. Oddly you can only select one sub-reference beneath a given project.

So far so good, though I can imagine this is quite tedious if you have say 20 binaries in a package. If one is committed to this, then one could make a master binary with entry points ala git, cvs or svn (e.g. "<master-binary> <command> <options>").
Previous Topic:how to change an environment variable of USER:PREFS type to USER:CONFIG type in java programmaticall
Next Topic:How to see function definition
Goto Forum:
  


Current Time: Sun May 11 03:53:15 EDT 2025

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

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

Back to the top