Yes you can use makefiles with codeblocks:
Project->Properties->This is a custom makefile
Then codeblocks is simply a editor....
Codeblocks does nothing. So if you add a file in the project you have to add it by yourself in the makefile. I can not help you with that...
There are still errors, which indicates either my incorrect settings in the code blocks, or my incorrect IDA, or somewhere else wrong.
You can post the build log for example?
E:\PL\PL1\pl1.cpp|70|error: 'init' was not declared in this scope|
this seems like you have forgotten a include file
Can you post the makefile? This would make things a lot easier...