Like the commenter siad, you need to include the right support headers.
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/support_multi_pass.hpp>
Howeever, the simplest way is:
std::ifstream file("myfile.txt", std::ios::binary);
file.unsetf(std::ios::skipws);
// use the ready-made:
boost::spirit::istream_iterator f(file), l;
// parse!
book ok = qi::parse(f, l, my_grammar);