views:

204

answers:

4

What is done when we import an existing project(maybe a visual studio project)?

Which files are used for configuration?

A: 

Eclipse manages files completely differently than Visual Studio, files are managed by Eclipse and placed into the project workspace. Adding existing files has the aggravating effect of copying the files from their location into the workspace. There are workarounds for this (adding a link to existing file, makefile-only projects) but the default is to copy files around.

This is great if your project is managed by Eclipse alone, not great if you want a VS project AND an Eclipse project for the same codebase.

I'm don't think you can import a VS project into Eclipse CDT, at least not the way you're thinking.

The files used for configuration are stored in (path to workspace)/.metadata, there are a LOT of files that change constantly and can contain absolute paths. Caveat emptor.

Sam Post
"manages files completely differently" is putting lightly. I'd say more like "aggressively commandeers files". :) Maybe I'm just cranky but I don't like this at all. I'd love to see an answer here that there *is* a way to take control of project contents (i.e. include a specific file into a project from anywhere in the filesystem.)
Steve Fallows
Yeah I feel the same way, that's why I went with standalone Makefiles. Eclipse can be taught to call the Makefile and you get a nice debugger without the build chain / project management hassle.
Sam Post
A: 

There is no explicit wizard for importing visual studio project files. What you import is a directory tree full of source code files. Basic information about this is worked out and stored in a file called .project, which contains the settings from Project/properties.

If, when you create or import the project, 'use default location' is specified, the tree is copied into a workspace directory. If not, it is left where it is.

If the project type is 'makefile project', the only real assumption is that there is some external command to be run to build the software. Project properties/C++ build can be used to specify this command - by default, it is 'make'.

DevStudio can export a makefile for one of it's projects - from the Project menu, select 'Export Makefile'. Or you can just write one by hand, or use some other build tool such as ant.

If all else fails, set the build command to 'cat' (e.g. from cygwin) and the build argument to the name of a file that contains the output log from however the software was built.

soru
+1  A: 

Try this one, you may get some information.

Migrate Visual Studio C and C++ projects to Eclipse CDT

Morpheus
A: 

Eclipse itself has two kinds of projects - those with makefiles, and those that it manages itself.

Makefile projects have a separate make file that you generally write on your own.

Eclipse managed projects have a .project file that is used by the IDE to create make files on the fly, when you build your project.

Are you asking specifically for visual studio projects, or is that just an example?

Sagar