

The only complex settings required in Code::Blocks are choosing specific directories for libraries and header files. This choice replaces the -c switch at the command prompt. To compile a project without linking, choose Build, Compile Current File. This configuration automatically applies the -g switch used at the command prompt. If you plan on debugging your code in Code::Blocks, ensure that the project is created with a debugging build. The settings and dialog box are pretty much identical summon the dialog box by choosing Project, Build Options. Unlike the Compiler Settings dialog box, the Project Build Options dialog box applies only to the current project. Or you can create a new entry on the Compiler Flags sub-tab by right-clicking.Ī similar dialog box is provided for Code::Blocks projects.

If you click the Other Compiler Options tab, you can enter switches manually. The Global Compiler Settings screen is chosen, Compiler Settings tab, Compiler Flags sub-tab set as shown in Figure 1. To summon the Compiler Settings dialog box, choose Settings, Compiler in Code::Blocks.

Setting compiler options in Code::Blocks (click to embiggen).
