Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to create Eclipse project from existing source

📅 2014-Feb-18 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ eclipse, nsight, project ⬩ 📚 Archive

When you create a project in Eclipse (or NVIDIA Nsight), it creates a new directory in your workspace and creates the files there. If you have your source files arranged under a directory in some other location, you might prefer to work on them without Eclipse copying them over to its workspace directory.

To achieve this, do not use the import option! Instead create a new project, in its dialog uncheck the Use default location option and provide the root directory of your source code. The entire contents of your source directory will appear in the newly created project. Do not fear, they have not been copied. Instead, Eclipse has created .project, .cproject and other hidden files and directories in your source directory, so that it can work from there. Also, any new files or directories you create under your source directory will automatically appear in your Eclipse project.

Another alternative to this approach is to create a Makefile project, which works similarly.

Tried with: NVIDIA Nsight 5.5.0 and Ubuntu 12.04 LTS

© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘📧