Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » How to build both a library and an executable
How to build both a library and an executable [message #216866] Fri, 30 May 2008 17:40 Go to next message
Eclipse UserFriend
Originally posted by: qabuzhd02.sneakemail.com

I have a c++ source-tree, and a CDT project to build a library from it
(which I created using the usual Eclipse "New Project" dialog). I also
want to build an executable from the same source-tree, for unit-testing
and debugging -- what's the simplest way to go about doing that?

I tried modifying the project to add a target for an executable, but I
wasn't able to get that to work -- perhaps I missed some settings that I
needed to modify. Are there instructions for modifying a CDT project to
make it build an executable, when the project was not originally created
to do so?

I also tried creating an entire second project, based on source-folders
which are unix soft-links to the original source-folders, but that didn't
work either.

Anyone who can point me to tutorial-style documentation for using various
parts of CDT would be much appreciated, as I have not been able to find
such.

Cheers,
Jonathan
Re: How to build both a library and an executable [message #217204 is a reply to message #216866] Mon, 09 June 2008 07:31 Go to previous message
Eclipse UserFriend
Jonathan wrote:
> I have a c++ source-tree, and a CDT project to build a library from it
> (which I created using the usual Eclipse "New Project" dialog). I also
> want to build an executable from the same source-tree, for unit-testing
> and debugging -- what's the simplest way to go about doing that?
>
> I tried modifying the project to add a target for an executable, but I
> wasn't able to get that to work -- perhaps I missed some settings that I
> needed to modify. Are there instructions for modifying a CDT project to
> make it build an executable, when the project was not originally created
> to do so?
>
> I also tried creating an entire second project, based on source-folders
> which are unix soft-links to the original source-folders, but that
> didn't work either.
>
> Anyone who can point me to tutorial-style documentation for using
> various parts of CDT would be much appreciated, as I have not been able
> to find such.
>
> Cheers,
> Jonathan
>

Please check "Project properties -> C/C++ Build -> Settings -> Artifact
Type"
You can add a configuration and then change "Artifact Type" to
"Executable" or "what you want".

Good luck~~ ;)
Previous Topic:Reference Search results view should look like the grep search
Next Topic:The configuration support is not installed on the system
Goto Forum:
  


Current Time: Fri May 09 00:21:10 EDT 2025

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

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

Back to the top