I'm not sure, but I think you have to include <acknex.h> and <afuncs.h>, or some engine functions will be undeclared.