Home » Language IDEs » C / C++ IDE (CDT) » How to bring in existing c/c++ files in to eclipse
| |
Re: How to bring in existing c/c++ files in to eclipse [message #93903 is a reply to message #93887] |
Thu, 12 February 2004 14:27   |
Eclipse User |
|
|
|
David Bearh wrote:
> adjustmadi wrote:
>
>
>>Hi,
>>I'd like to use Eclipse for existing legacy code. How do I create a
>>project for exisiting code ?
>
>
>>Using M6 release.
>>Many Thanks,
>>AdjustMadi
>
>
> Hi,
>
> One way to do this is to create the new project and leave it blank. When
> you set it up, take note of where the project is located on the hard
> drive / file system.
>
> then copy all your source code into that location including the make file.
>
> Then in eclipse, click on the "File | Import" menu and select 'File
> System'.
Select the base directory of your project here.
Your main makefile must be in this base too, or at least a startup
makefile launching subdir builds.
For having content assist to work with standard make projects, I think
you still have to add the directories in the projects preferences
dialog. And until they got the variables working (once upon a time ;)),
you have to give the full paths not relatives.
> Select the file(s) (not sure if it supports multiple files) to import
> them to your project.
>
> Hope this helps,
>
> David
>
>
|
|
|
Re: How to bring in existing c/c++ files in to eclipse [message #94135 is a reply to message #93903] |
Fri, 13 February 2004 10:09   |
Eclipse User |
|
|
|
Hi Kesselhaus,
You mentioned using a nested makefile. I think the problem I'm having
with
http://www.eclipse.org/newsportal/article.php?id=3382&gr oup=eclipse.tools.cdt
is that i don't have a makefile at the higher level
my structure looks like this:
ocean
|----------boat
| |------ boat.cc
| |------ Makefile
|----------plane
| |------ jet.cc
| |------ Makefile
etc
I think to make it work I need to put a makefile at the ocean level.
The question is, what goes in that makefile? I've never used nested
makefiles before.
Thanks,
David
kesselhaus wrote:
> David Bearh wrote:
> > adjustmadi wrote:
> >
> >
> >>Hi,
> >>I'd like to use Eclipse for existing legacy code. How do I create a
> >>project for exisiting code ?
> >
> >
> >>Using M6 release.
> >>Many Thanks,
> >>AdjustMadi
> >
> >
> > Hi,
> >
> > One way to do this is to create the new project and leave it blank. When
> > you set it up, take note of where the project is located on the hard
> > drive / file system.
> >
> > then copy all your source code into that location including the make file.
> >
> > Then in eclipse, click on the "File | Import" menu and select 'File
> > System'.
> Select the base directory of your project here.
> Your main makefile must be in this base too, or at least a startup
> makefile launching subdir builds.
> For having content assist to work with standard make projects, I think
> you still have to add the directories in the projects preferences
> dialog. And until they got the variables working (once upon a time ;)),
> you have to give the full paths not relatives.
> > Select the file(s) (not sure if it supports multiple files) to import
> > them to your project.
> >
> > Hope this helps,
> >
> > David
> >
> >
|
|
|
Re: How to bring in existing c/c++ files in to eclipse [message #94716 is a reply to message #94135] |
Thu, 19 February 2004 11:48  |
Eclipse User |
|
|
|
Basically, you create a makefile in ocean with a target, say 'ocean',
'all', or whatever makes sense for your project. It dependes on dummy
targets which, when evaluated, simply go to the appropriate subdirectory
and call make there. The snippet below shows one way to do it using Gnu
make. If your make utility does not support the -C flag, you can issue
the shell command 'cd <dir> && make [targets]'
ocean: boat plane
boat:
make -C boat [targets]
ocean
make -C ocean [targets]
Hope this helps.
David Bearh wrote:
> Hi Kesselhaus,
>
> You mentioned using a nested makefile. I think the problem I'm having
> with
> http://www.eclipse.org/newsportal/article.php?id=3382&gr oup=eclipse.tools.cdt
> is that i don't have a makefile at the higher level
>
> my structure looks like this:
>
> ocean
> |----------boat
> | |------ boat.cc
> | |------ Makefile
> |----------plane
> | |------ jet.cc
> | |------ Makefile
> etc
>
> I think to make it work I need to put a makefile at the ocean level.
>
> The question is, what goes in that makefile? I've never used nested
> makefiles before.
>
> Thanks,
>
> David
> kesselhaus wrote:
>
>
>>David Bearh wrote:
>
>
>>>adjustmadi wrote:
>>>
>>>
>>>
>>>>Hi,
>>>>I'd like to use Eclipse for existing legacy code. How do I create a
>>>>project for exisiting code ?
>>>
>>>
>>>>Using M6 release.
>>>>Many Thanks,
>>>>AdjustMadi
>>>
>>>
>>>Hi,
>>>
>>>One way to do this is to create the new project and leave it blank. When
>>>you set it up, take note of where the project is located on the hard
>>>drive / file system.
>>>
>>>then copy all your source code into that location including the make file.
>>>
>>>Then in eclipse, click on the "File | Import" menu and select 'File
>>>System'.
>
>
>>Select the base directory of your project here.
>>Your main makefile must be in this base too, or at least a startup
>>makefile launching subdir builds.
>
>
>>For having content assist to work with standard make projects, I think
>>you still have to add the directories in the projects preferences
>>dialog. And until they got the variables working (once upon a time ;)),
>>you have to give the full paths not relatives.
>
>
>>>Select the file(s) (not sure if it supports multiple files) to import
>>>them to your project.
>>>
>>>Hope this helps,
>>>
>>>David
>>>
>>>
>
>
>
|
|
|
Goto Forum:
Current Time: Fri Jul 18 15:15:37 EDT 2025
Powered by FUDForum. Page generated in 0.09457 seconds
|