You need to tell Code::Blocks to add the existing file as part of your project. I haven't used Code::Blocks and don't have it installed, but I would assume that if you right click on your project name in the project tree, you should get an option along those lines.