How to open eclipse java project and C ++ project project in the same root directory

I have a directory with java / C ++ code (they are in different subdirectories, several of them). How can I open eclipse Java project and C ++ project project in the same root directory? eclipse won't let me say something like "there is a project in the same location"

Thanks.

+1


a source to share


2 answers


In the settings of the path for creating a Java project, you can specify external folders for the build. Link additional source: use this if you have a folder on the filesystem that should be used as an additional source file

So you can have your C ++ project pointing to the main folder and then create a java project in a different directory and then use the mechanism described above to compile the entire java source. Not a great solution as you have two projects and two different jobs.

What I can tell you for sure is that you can only have one project for each location in the filesystem, since eclipse generates a whole bunch of dirs metadata, etc.



My only thought is to create a project that builds Java and C ++. Eclipse has a concept of builders and nature. Somehow you need a project with Java and C ++ natures / builders ...

I did a quick google and it looks like this post covers both of these options: http://lorinc.blogspot.com/2006/10/how-to-mix-java-and-c-code-in-singe.html

0


a source


I'm not sure if I understood correctly You have:

"workspace \ project \" which contains both projects together?
I don't think you can, as eclipse creates some files (like .project) for each project .. if both have the same directory then eclipse needs two files, one name, one location.



I suggest moving the C project to a different folder.

0


a source







All Articles