Please post the build log and run log to give us information.
Link on how to post build log
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F)
We need the Operating System version and Code::Blocks version.
The compiler version would also help; but, most people have no idea what it is.
Example: Windows 7 64 bit; CodeBlocks 20.03 64 bit
If on Windows the information about 32 bit or 64 bit is needed; been a lot of problems related to that.
If on Linux, then the information from Help -> About (Information Tab will be useful)
Name : Code::Blocks
Version : 20.03-r11983
SDK Version : 2.0.0
Scintilla Version: 3.7.5
Author : The Code::Blocks Team
E-mail : info@codeblocks.org
Website : http://www.codeblocks.org
wxWidgets Library (wxMSW port)
Version 3.1.3 (Unicode: wchar_t, debug level: 1),
compiled at Apr 16 2020 16:17:50
Runtime version of toolkit used is 6.1.
Tim S.