I'm not familiar with that class/SDK, but you as you can see from the header file SetAndUseFlagsL() is not exported method (IMPORT_C prefix is missing). That is the reason for 'unresolved external' error.
Maybe you should use some readymade classes derived from CAknQueryControl, e.g. CAknNumberQueryDialog, or just implement your own version which is also derived from CAknQueryControl class. My quess is that CAknQueryControl is meant to be used only as a base class for other classes.
What information you are trying to query by the user ?