Multiple app debugging
Real life projects are large in size and may consist of several sub-projects. It is essential that an IDE allows debugging of large apps spanning across several projects. With Code::Blocks we can do it easily.
To learn multiple app debugging we'll create two projects—first project a DLL project and second one is a console project that depends upon first DLL project. Then save both projects under same workspace named App8
.
Go to File | New | Project | Dynamic Link Library menu option to create a DLL project. Name this project libobject
. Now rename the libobject
project files. We'll rename main.h
file to dllmain.h
and main.cpp
to dllmain.cpp
file. To do this, close all open editor files and right-click on the file name in the project tree as shown in the following screenshot:

Enter new file name in the dialog box shown in following screenshot:

This will avoid ambiguities in file names. Now replace code inside dllmain.h
file with the following code.
#ifndef __DLLMAIN_H__ ...