Interesting... I going to try it again, maybe I did something wrong. Thanks.
Edit: OK, I've catched the reason. The function declaration was in the main at my side. After I moved that out of the main, it suddenly began to work. Now it is OK. Thanks again Emre.