Book Image

C++ Application Development with Code::Blocks

By : BIPLAB MODAK, Biplab Kumar Modak
Book Image

C++ Application Development with Code::Blocks

By: BIPLAB MODAK, Biplab Kumar Modak

Overview of this book

Table of Contents (13 chapters)

Debug versus release target

We noticed that in App1 and App2, there are two build targets in each project—namely debug and release. In this section we'll learn more about it.

Code::Blocks defines two default build targets—debug and release at the time of a project creation.

As the name suggests a debug target is suitable for app debugging. Appropriate compiler options are added to generate debugging symbols in the compiled app. It also disables all program optimizations.

We can find in the following screenshot (navigate to Project | Build options… menu option) a Debug target has a compiler option Produce debugging symbols. This instructs compiler to generate debugging symbols, which allows app debugging:

A Release target disables generation of debugging symbols. It also defines appropriate compiler options to optimize the program. Thus this is suitable for code to be used in production. The following screenshot shows typical compiler flags in a release target.

These two targets are quite important...