How to create a project with multiple sub projects [message #217510] |
Wed, 18 June 2008 03:25  |
Eclipse User |
|
|
|
Originally posted by: chenal.naritech.cn
I create a c++ project imported from head first design patterns source
codes, in which there are multiple sub projects, such as Adapter,
Factory, Strategy and etc. In each sub project, there is a .cpp source
file containing the main method. When I compile the project, eclipse
will tell errors that the project has multiple main methods. I do not
want to create individual projects for each design pattern. So how to
work out the problem?
Allen
|
|
|
|
|
Re: How to create a project with multiple sub projects [message #217706 is a reply to message #217540] |
Mon, 23 June 2008 17:29  |
Eclipse User |
|
|
|
Originally posted by: joppekroon.gmail.com
Derek is right,
If you're using the automatic makefile generation from eclipse, you will
have to split it up in several projects. however I would like to add that
it is not to hard to write makefiles that can do what you want, just use
the standard make system.
If you have some time to spare you could write an extension to the Managed
Build System to generate the makefiles yourself. I'm in the process of
writing a plug-in that does exactly that, and It's almost finished. drop
me a line if you're interested.
Greetings,
Joppe Kroon
Derek wrote:
> Eclipse will compile and link all source files that it finds within a
> project and sub-folders. If you have multiple main() files that create
> individual .exe's then each will need to be in its own project.
> Allen Chen wrote:
>> Allen Chen ÐŽµÀ:
>>
>> I am sorry the sub project(s) should be sub folder(s).
>>
>>> I create a c++ project imported from head first design patterns source
>>> codes, in which there are multiple sub projects, such as Adapter,
>> folders
>>> Factory, Strategy and etc. In each sub project, there is a .cpp source
>> folder
>>> file containing the main method. When I compile the project, eclipse
>>> will tell errors that the project has multiple main methods. I do not
>>> want to create individual projects for each design pattern. So how to
>>> work out the problem?
>>>
>>> Allen
|
|
|
Powered by
FUDForum. Page generated in 0.03175 seconds