How can I solve this problem ?
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)
Do you have libbgi.a anywhere? If so, tell the linker where it is (Build Options -> Search Directories -> Linker). If not, download the sources, compile them to get the library and put the library where the linker can find it.