function not declared in the scope

Post your code (using the "#" CODE TAGS toolbutton.

If you know how to post your compiler verbose output attach that as well.