I get the error undefined reference to \'chk(int)\' from the Code::Blocks IDE and was able to simplify the problem down to the following
la_main.cpp