Thank you for the link.
I found out already, that one thing is importent to use curses or ncurses and that is to link it with your program.
Code::Blocks -> project -> Build options -> Linker settings -> Add
Here I typed: curses and ncurses.
Now I can write: char bar = getch(); without any problems.
Unfortunally the program "falls through" the getch statement.
Maybe someone knows how this can happen (it always worked fine in the Windows Dos box).
At the moment I am searching for the most simple solution to run my program like I did in Windows.