Eclipse is a free graphical programming environment available for most computing platforms. This page explains some of its terms and gives instructions for using Eclipse for code browsing and debugging.
The Eclipse interface is a window with sub-windows. A window is called a pane or a view in its documentation. A collection of panes is called a perspective. The two most used perspectives, if you develop C/C++ projects, are "C/C++" and "Debug". The former has windows containing the list of program files, and the latter has control buttons for stepping through a program and examining run-time variables.
Create a new project as follows.
- click menu "File->New" and bring up the dialog box.
- select the type of the project, click next
- in the next frame
- type in the project name
- uncheck the box "Use default location"
- give the full path of the top directory containing source files (I assume all source files are under a single directory)
- click "finish"
The project will appear in the upper left pane. To search for a symbol, use the menu "Search->C/C++". You can search for just declarations, definitions, references or their combinations. You can also do a file search to find a certain string. You can use special characters in the search string: "*" for any string and "?" for any character.
If you highlight a symbol in an editor view and then open the search dialog box, the symbol will automatically be added to the search field.
There is a view called "Outline" when you use the Debug perspective. It lists the top-level structures of a source file, letting you see quickly all the symbols and functions being defined without the details. You don't need to set up debugging options to use the Outline view.
Add a makefile project
Set up a project following the instructions under "Source browsing". Let's say the makefile is at make_dir/Makefile, and it generates an executable at exe_dir/prog. Input these two pieces of information as follows:
- click on the project name in Project Explorer view, then choose menu "File->Properties"
- click "C/C++ Build" on the left option window
- select "External builder" option
- uncheck "Use default build command" box
- type in the command, usually "make", in the Build command box
- uncheck "Generate Makefiles automatically"
- put make_dir in the "Build directory" box
- click Apply button
- select menu "Run->Open Debug Dialog" to pull up the dialog window
- create an entry under "C/C++ Local Application" type on the left option bar
- you can create as many entries as you need, e.g. different input arguments for the same executable
- once you set up one entry, use the copy button on the top of the bar to replicate and then change
- give it a name
- click "Main" tab
- put in the project name
- under the title "C/C++ Application" put in your executable, e.g. exe_dir/prog
- click "Arguments" tab
- give the arguments
- put in the working directory (from which the executable is called)