Issue
I have a C program file in a folder. When I right-click on it and choose to open with other programs it doesn't show eclipse in the list of other programs.
Although I can start eclipse and it asks me to choose a workspace. By default, the workspace is in the C drive. But my C program file is in D drive. How do I open the C file in eclipse?
Solution
Eclipse is an IDE that requires a 'workspace'. This workspace is nothing but a directory residing in any of your drives where it can keep project-related files along with some meta information. Usually, you can create multiple projects within a single workspace. So, project is not a workspace, rather eclipse project(s) resides in a workspace.
To achieve what you are trying to do is very simple with these steps:
- Launch eclipse
- When it asks for a workspace location, note down the default it has proposed. It is typically a eclipse directory at C:/users//
- Create a C/C++ project (Most likely console application or something similar verbatim)
- Right click on project on your left, click add sources and select the C file you require
- Build and observe the Console tab to check the build output
Note: The names for the options/steps I am suggesting may differ from what IDE you are using. I typically use eclipse-based IDEs for cross-compilers so the options may differ, but the concept is just the same.
Answered By - WedaPashi