Cumbersome and difficult to add existing source files to project [message #736656] |
Fri, 14 October 2011 03:40  |
Eclipse User |
|
|
|
Hi Guys
I am really finding that trying to add existing c files to my project is extremely cumbersome - I'm almost 100% sure that I am doing something wrong and hope you could help me!
I have an existing C project in eclipse that lives in the workspace. Only my main.c file is in the actual workspace, and I want to include c files checked out using tortoise svn ( I am running windows 7 ) from various locations on my hard drive.
What I typically do to accomplish this:
1. Right Click on the Project
2. Select New -> Folder
3. Select Advanced, 'Link to alternate location)
4. Browse to the folder I want to include
5. Select Finish
The folder is now in my workspace. This is very cumbersome if you have multiple folders you wish to add - and especially if you copy the workspace to a different PC and all the paths need updating. The second step is to set-up the include directories for the compiler so it actually knows where the files are. My eclipse auto-detects a MINGW GCC installation somewhere on my machine. These steps does it:
1. Right click on the project, select 'Properties'
2. Select C/C++ General -> Paths and Symbols
3. Click GNU C on the Includes Tab under languages
4. Click Add - > Workspace
5. Select the folder you just added
Finally I can compile. I do not wish to have my c files in my workspace, so using eclipse to checkout from svn into the workspace is not what I want to do (also against project policy for some reason). Saying that, importing and making a copy of the files in the workspace is also out of the question.
Is there a simpler way to do all of this? Basically I need to be able to set-up a relative path to my c files, and have eclipse update all necessary paths such that the active compiler is aware of the source location.
Any help is much appreciated!
|
|
|
|
Powered by
FUDForum. Page generated in 0.04095 seconds