I've noticed that many attributes in an Eclipse CDT project files (.cproject) contain random numbers, e.g.
cconfiguration id="ilg.gnuarmeclipse.managedbuild.cross.config.elf.debug.980615563"
So:
What are they for?
Is it safe to clone such a project, and include it in the same workspace as the original (after renaming it, of course)?
Related
I am working on a project containing java and c++ files. The java files are edited in Eclipse, and c++ files in Visual Studio. I use SVN on Eclipse to commit changed files into repository. There is no problem with files edited in Eclipse itself, however, the files edited outside Eclipse are not recognized as changed (outgoing) unless I open them in Eclipse. Is there a way to force Eclipse to check all the files for changes, so that I do not need to keep track of changed c++ files myself?
Use the "refresh" command on the folder containing the changed files.
The title says it all: I have source files and a CMakeLists.txt for an existing C++ project. Now I want to create a project in Eclipse CDT using those files.
I want to be able to build the project with the "build" button from within Eclipse once I'm done, and I want to be able to use GDB.
I've used the CMake option to create Eclipse projects before, but it didn't always work flawlessly and I was told the CMake generator for Eclipse is supposedly outdated.
I know I could just create an empty project and then copy the source files into it, but what about the CMakeLists.txt? I want Eclipse to know how to build the project.
I'm new to Eclipse and there are like fifty ways to start a new project with or without existing source files, so some guidance would be greatly appreciated.
I found it very difficult to configure linked resource in Eclipse CDT.
Folder "wspolne" is located somewhere in the system, I'd like to use .cpp .h files from it in my current project, but avoid copying it.
From what I read about Linked Resources is a solution, but I can't build a projct :/
I followed instuctions described here with out any result: What's wrong ?
Image that shows problem:
alt text http://img260.imageshack.us/img260/1629/eclipsen.jpg
I am not sure linked folder are always adequately indexed by the CDT
(update October 2012, it has gotten better with recent CDT releases)
A workaround would be, as in this thread:
If you want CDT to manage the builds you need to move the sub-folders into there own project folder and create dependencies between them.
I want to commit my CDT project to SVN. I am a newbie regarding CDT, and I'd like to know the files describing the project.
The concerned files seem to be :
.project
.settings (directory)
.cproject
.csettings (directory)
What are the purposes of .project and .settings ?
.project just include references to XML files stored in the .csettings directory. Some of my co-workers on other projects don't have this .csettings directory : everything is in the .cproject file. Are there some project properties which could make Eclipse delegates all the CDT settings in XLM files in the .csettings directory ?
And what about .csettings ?
Extra question : what is the .directory ?
.project is where Eclipse starts whenever it opens up the project: it tells the workbench what plugins are needed.
.cproject contains the settings specific to the CDT: your project's choice of build configurations, toolchains, individual tools and so on.
.settings can be used by individual plug-ins to store their own project-level preferences.
I've never come across .csettings...
.CPROJECT: This will contain all the settings provided for the particular selected Toolchain. For example, if the project needs to be created with gcc, then this .cproject file will contain all the compiler, linker options used by gcc.
Also if any boot-able files located within the project needs to be excluded that too will be specified here. In general it acts as a make to your project.
.PROJECT: Eclipse uses inbuild make file for linking the object files. This .project file will contain all the builder information (managebuilder).
.SETTINGS: This will contain the debugging information's for the selected toolchain. Like how the "COMPILER\ASSEMBLER\LINKER" includes are separated, eg., by means of ";" like that.
Every eclipse project has a .project file, general project settings (like the name of the project) go here
The .cproject file is where the CDT project specific settings go.
I'm not sure what the .settings and .csettings directories are for. Probably for project specific settings that can't be added to the .project and .cproject files.
On unix files (and directories are just a special type of file in unix) that begin with a . are hidden files.
I have a large existing c++ codebase. Typically the users of the codebase edit the source with gvim, but we'd like to start using the nifty IDE features in Eclipse. The codebase has an extensive directory hierarchy, but the source files use include directives without paths due to some voodoo we use in our build process. When I link the source to my project in Eclipse, the indexer complains that it can't find any header files (because we don't specify paths in our includes.) If I manually add the directories from the workspace to the include path then everything works wonderfully, but obviously adding hundreds of directories manually isn't feasible. Would there be a simple method to tell Eclipse to look anywhere in the project for the include files without having to add them one by one? If not, then can anyone suggest a good starting place, like what classes to extend, for writing a plugin to just scan the project at creation/modification and programatically add all directories to the include path?
The way that CDT manages build paths is by looking at the .cdtbuild xml file in the base of your projects directory (it might be a different name on windows... not sure)
In this you should see something like
<option id="gnu.c.compiler.option.include.paths....>
<listoptionValue builtIn="false" value=""${workspace_loc:/some/path}$quot;" />
<listOptionValue ... />
...
</option>
this is where all the build paths that you configure in the gui are placed. It should be pretty easy to add all the directories to this using a simple perl script to walk the project and generate all the listOptionValue entries.
This is obviously not the ideal method. But im curious, what build system are you migrating from, if it is make based you should be able to get eclipse to use your make files.
This feature has already been implemented in the current CDT development stream and will be available in CDT 6.0, which will be released along with Eclipse 3.5 in June 2009.
Basically if you have an #include and the header file exists somewhere in your project then CDT will be able to find it without the need to manually set up include paths.
If you need the feature now you can download and install the latest CDT development build.
Eclipse Bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=213562
Latest CDT 6.0 Builds: http://download.eclipse.org/tools/cdt/builds/6.0.0/index.html
From reading the this Eclipse CDT FAQ entry, it sounds like Eclipse can automatically generate a list of include directories if you start your build from within Eclipse and if your build outputs the gcc / g++ commands before actually starting gcc / g++. You can change how Eclipse starts a build by going under Project Properties then selecting the C/C++ Build category and looking for the Build Command option on the right side of the dialog.
Depending on the amount of voodoo you are doing in your build process, then Eclipse may not be able to correctly parse your source files, especially if you have similarly named headers for different source files. If you really want to take full advantage of Eclipse you're going to need to make sure that with whatever setup you have you aren't going to be confusing the parser. Personally I would recommend having a simple layout and build process.
As for the question at hand, adding the directories one by one is pretty much your best bet.