Well, the linker (not part of codeblocks, but part of your compiler environment) tells you, that he can not find the library "-lcmdlg32".
To solve your problem you have to tell the linker where he can find this library.
The right way to do this is by adding the path to the library in
Project->Build options->Search directories->Linker->Add
gretings