if you post a build log, please use code tags (the # symbol in the new post editor)
I think you made a error by setting the paths/ libs...
in the build log there are many paths with no option in the front:
ingw32-g++.exe -o "C:\C-C++ Development\analog_clock.exe" "C:\C-C++ Development\analog_clock.o" -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 "C:\Program Files\CodeBlocks-EP\sdk\winbgim\lib\libbgi.a"
here the last lib is wrong. It should be
-l"C:\Program Files\CodeBlocks-EP\sdk\winbgim\lib\libbgi.a"
or
-L"C:\Program Files\CodeBlocks-EP\sdk\winbgim\lib\"
how to set up this things you can read in the wiki: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F
greetings