Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open existing C++ project with Eclipse?

Tags:

c++

eclipse

I have two projects in C++ that I need to run and build both in Windows and Linux. We are using Microsoft TFS for source control.

  • For windows we are using Visual Studio.
  • For Linux we are using Eclipse. (I don't have much experience with Eclipse)

I had managed to configure and build properly the projects in both platforms.

I checked in TFS the .cproject and .project from eclipse, so I can use it in another computer.

Now I am trying to get the projects in another Linux computer and I don't know how to do it.

I tried following this instructions, but I don't have my source code zipped.

Other places like here suggest creating a new project.

Isn't there a way to open an existing project in Eclipse similar to Visual Studio?

Do I have to create a new project? If so, how can I keep the configurations I did to be able to build the project so other developer can use them?

like image 209
Dzyann Avatar asked May 21 '14 14:05

Dzyann


People also ask

Can we run C program in Eclipse?

Eclipse is popular for Java project development. It also supports C/C++, PHP, Python, Perl, and other web project developments via extensible plug-ins. Eclipse is cross-platform and runs under Windows, Linux and Mac OS.

How do I import C++ code into Eclipse?

Importing C/C++ code into an existing project The IDE displays the Check Out As dialog. Choose Check out into an existing project, and then click Next. The IDE displays the Check Out Into dialog: Select an existing project from the list, and then click Finish to add the code from CVS to the selected project.


1 Answers

File > Import... > General > Existing projects into workspace

Don't select an archive file. Set the root directory to where your .project and .cproject files are located. Your project should show up in the list. Make sure you don't forget to check the checkbox in front of your project.

Committing eclipse project files to a version control system is perfectly fine as long as you don't use absolute paths in your project settings. Use environment variables to specify paths which differ between developer machines.

like image 113
jasal Avatar answered Sep 22 '22 13:09

jasal