there is a pdf file with this post,
How to setup Opencv with Codeblocks on ubuntu – linux- centos MAnual PDF ,