I had this same issue with my old borland compiler
That suggests a PEBCAK. In any case, it's not something related to Code::Blocks nor something we would be able to help with.
To be clear: Code::Blocks is an IDE which runs under a graphical environment. That means it is a tool responsible for editing and organizing the sources into a project, and calling the compiler with appropriate options. It does not compile anything, nor does it manage your compiler and/or development library installation.
It also means you cannot run it under DOS (due to lack of GUI). However, you can still
develop DOS applications or applications for other platforms that do not have a graphical environment or much of an operating system (say, Arduino) which may even run on a completely different processor,
provided that you have a compiler environment set up that works.
How to set up each and every single one of the 57,320 existing compilers for 43,997 platforms, with 350 toolkits, and a million auxilliary libraries is something we can't tell. At least, not for the ones we're not incidentially using ourselves.