I have to shamefully admit that I found the cause for the problems.
I uninstalled and purged CodeBlocks and libcodeblocks0 again and re-booted the system. When I opened my terminal window and run "codeblocks" (just to ensure it's gone), I couldn't believe my eyes. I got the error message again.
Now I ran "whereis codeblocks", and it pointed me to /usr/local/bin. Now I realized what had happened.
Apart from my home folder, I copied my old /usr/local/bin folder, where I put some small self-written programs (mainly in Python), to my new installation. For some unknown reason, the folder also contained an obviously self-compiled CodeBlocks 17.12 executable. I wonder why this hasn't caused any problems in my old Ubuntu installation.
After removing it and re-installing CodeBlocks, it worked fine.
Thanks a lot for your support and BR,
doctor_vitus