Anjuta IDE Manual
<<< Previous | Setting Compiler Options | Next >>>

# Other compiler settings

To set miscellaneous compiler settings:

1. Choose the menu item Settings->Compiler and Linker Settings … and click on the `Others` tab in the Compiler Options dialog.

2. Various options for compiling are set on this tabbed section.

Figure 8. Other Compiler Settings dialog

The first is the `Enable Debugging` option. This option tells the compiler to add extra debug information (such as the symbol table), which is necessary for stepping through the code. This makes the program slightly larger.

This option will be most useful during the development of your program. When the code is ready for the release, disable this option and build the program again. The project should be cleaned first before the rebuild — otherwise, due to automatic dependency checking, not all of the files may be built with this option disabled.

Note that it is not a good idea to enable any sort of optimization if you have also enabled debugging. It will not do any harm to do so, but it will make life much more difficult when debugging the program. With optimization enabled, the compiler will modify your code to improve performance. This sometimes creates confusion during debugging, as the line number that the debugger refers to will not always correspond to the actual line number in the source file.

The second option `Enable Profiling` is similar to the `Enable Debugging` option, except that it builds your program with profiling information. Profiling is not yet implemented in `Anjuta`. For the time being, you can use `gprof`, a console-based profiler; or `MemProf`, which is a GUI (GTK) application. Read the gprof manual page to learn how to profile your program. Enabling profiling will make a progam run very slowly, so it should only be used for debugging.

Additional options to pass to the compiler and linker can be entered into the text boxes on this tabbed section.

<<< Previous | Home | Next >>>
Code Optimization | Up | Project Management