How to build both a library and an executable [message #216866] |
Fri, 30 May 2008 17:40  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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~~ ;)
|
|
|
Powered by
FUDForum. Page generated in 0.03521 seconds