We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
How do I move build output directory 'Debug' to another location in the project folder under DS-5 Eclipse environment? Also, I would like to place .project/.cproject files and .settings folder, if possible.
Hi pradeep,
Moving the build location is not easy as it really depends on the Project type you created in the first instance - if you wish to change it, it's in Project Properties, under C/C++ Build (top level). There is a checkbox marked "Generate Makefiles automatically" which you need to uncheck to allow the Build location for that target to be selected. However this will stop Eclipse from generating a Makefile for you automatically each time you build the project - you will have to craft one by hand. This is the compromise you have to make.
Alternatively you could use symbolic links at the filesystem level to link the Debug and Release (or whatever your configuration name is) folders to somewhere else in the project. This is less intrusive to your project structure, but may be a little difficult to support depending on the version of Windows you're using (or if you're checking out of a version control system which doesn't support it).
~
Moving the .dotfiles around is another compromise. You should create a new project in a location you desire, right click the Project and use "New" -> "Folder" within your project. It will open a complex dialog with an "Advanced >>" button. Click this and you can select "Link to an alternate location (Linked Folder)." In this manner you can essentially create a project directory deep in your source tree (for instance mysource/build/settings/eclipse/ds-5/) and then link all the directories below it into the project again. It will not touch the top level to write these settings as they go into the folder pointed to by the $workspace_loc variable. It is backwards but it works
If you use the above method to move the .dotfiles around you may be pleased to see that the Debug and Release folders are created where the .dotfiles are kept. So this might be an easier solution for the first instance, too.
Ta,
Matt