Eclipse : add automatic include folder

Eclipse is a  C, C++, Java and other programming language editor. I use this editor to create program with C/C++. When I use this editor, I have a problem to add include directory to eclipse editor. Right click at your project folder in Eclipse and choose Properties (Alt+Enter).  Locate and click Paths and Symbols menu. This is a picture to add include directory to Eclipse :

Usually I use add button to add include directory location in Eclipse. When I want to add multiple directory, we must manually add that directory one by one because Eclipse dont have include directory with subdirectory :(.

We can use export and import settings to add multiple include directory to Eclipse. First, we click Export Settings button to open export dialog.

Fill Export to file input with your file output name. When we click Finish button, Eclipse will create a settings xml file. This is a example of content of this file :

If we want to add other include directory in C source, so we can add new include directory at bottom of text <language name=”C Source File”>. This is example if I want to add other include directory to Eclipse :

Save xml file and use import file. This is a dialog window to import new Eclipse setting file :

If import file success, so when we open property window Eclipse at menu Path and Symbols, we can get new include folder directory at Eclipse. When we want to use this include directory, we can use import method at our new project.


Add a Comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.