make sure you have the flex viewer files in your project before compiling. see this wiki page over on GitHub on the Search Widget for Flex.