Things always fail with Code::Blocks, don't use it for such a task. You don't need to edit SFML, you just want to compile it. Therefore there's no point generating an IDE project, just generate a MinGW makefile and compile with "mingw32-make" on the command line.