|
Boost Users : |
Subject: [Boost-users] Wave Linker Error
From: Alexander Feldman (alex_at_[hidden])
Date: 2011-09-06 01:54:17
Gentlemen,
I'm getting the following linker error:
/tmp/ccTiqxQC.o: In function
`boost::wave::cpplexer::lex_input_interface<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,
std::char_traits<char>, std::allocator<char>,
boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,
std::allocator<char> >, char*> > > > >*
boost::wave::cpplexer::lex_input_interface_generator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,
std::char_traits<char>, std::allocator<char>,
boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,
std::allocator<char> >, char*> > > >
>::new_lexer<boost::spirit::classic::position_iterator<boost::spirit::basic_istream_iterator<char,
std::char_traits<char> >,
boost::spirit::classic::file_position_base<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
boost::spirit::classic::nil_t>
>(boost::spirit::classic::position_iterator<boost::spirit::basic_istream_iterator<char,
std::char_traits<char> >,
boost::spirit::classic::file_position_base<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
boost::spirit::classic::nil_t> const&,
boost::spirit::classic::position_iterator<boost::spirit::basic_istream_iterator<char,
std::char_traits<char> >,
boost::spirit::classic::file_position_base<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
boost::spirit::classic::nil_t> const&,
boost::wave::util::file_position<boost::wave::util::flex_string<char,
std::char_traits<char>, std::allocator<char>,
boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,
std::allocator<char> >, char*> > > const&, boost::wave::language_support)':
wave+spirit.cpp:(.text._ZN5boost4wave8cpplexer29lex_input_interface_generatorINS1_9lex_tokenINS0_4util13file_positionINS4_11flex_stringIcSt11char_traitsIcESaIcENS4_9CowStringINS4_22AllocatorStringStorageIcS9_EEPcEEEEEEEEE9new_lexerINS_6spirit7classic17position_iteratorINSK_22basic_istream_iteratorIcS8_EENSL_18file_position_baseISsEENSL_5nil_tEEEEEPNS1_19lex_input_interfaceISH_EERKT_SY_RKSG_NS0_16language_supportE[boost::wave::cpplexer::lex_input_interface<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,
std::char_traits<char>, std::allocator<char>,
boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,
std::allocator<char> >, char*> > > > >*
boost::wave::cpplexer::lex_input_interface_generator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,
std::char_traits<char>, std::allocator<char>,
boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,
std::allocator<char> >, char*> > > >
>::new_lexer<boost::spirit::classic::position_iterator<boost::spirit::basic_istream_iterator<char,
std::char_traits<char> >,
boost::spirit::classic::file_position_base<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
boost::spirit::classic::nil_t>
>(boost::spirit::classic::position_iterator<boost::spirit::basic_istream_iterator<char,
std::char_traits<char> >,
boost::spirit::classic::file_position_base<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
boost::spirit::classic::nil_t> const&,
boost::spirit::classic::position_iterator<boost::spirit::basic_istream_iterator<char,
std::char_traits<char> >,
boost::spirit::classic::file_position_base<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
boost::spirit::classic::nil_t> const&,
boost::wave::util::file_position<boost::wave::util::flex_string<char,
std::char_traits<char>, std::allocator<char>,
boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,
std::allocator<char> >, char*> > > const&,
boost::wave::language_support)]+0x13): undefined reference to
`boost::wave::cpplexer::new_lexer_gen<boost::spirit::classic::position_iterator<boost::spirit::basic_istream_iterator<char,
std::char_traits<char> >,
boost::spirit::classic::file_position_base<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
boost::spirit::classic::nil_t>,
boost::wave::util::file_position<boost::wave::util::flex_string<char,
std::char_traits<char>, std::allocator<char>,
boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,
std::allocator<char> >, char*> > >,
boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char,
std::char_traits<char>, std::allocator<char>,
boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,
std::allocator<char> >, char*> > > >
>::new_lexer(boost::spirit::classic::position_iterator<boost::spirit::basic_istream_iterator<char,
std::char_traits<char> >,
boost::spirit::classic::file_position_base<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
boost::spirit::classic::nil_t> const&,
boost::spirit::classic::position_iterator<boost::spirit::basic_istream_iterator<char,
std::char_traits<char> >,
boost::spirit::classic::file_position_base<std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
boost::spirit::classic::nil_t> const&,
boost::wave::util::file_position<boost::wave::util::flex_string<char,
std::char_traits<char>, std::allocator<char>,
boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char,
std::allocator<char> >, char*> > > const&, boost::wave::language_support)'
collect2: ld returned 1 exit status
--------------------------
Trying to link:
std::ifstream instream(argv[1]);
std::string instring;
if (!instream.is_open()) {
std::cerr << "Could not open input file: " << argv[1] <<
std::endl;
return -2;
}
instream.unsetf(std::ios::skipws);
typedef
boost::spirit::classic::position_iterator<boost::spirit::istream_iterator>
pos_iterator;
boost::spirit::istream_iterator begin1(instream);
boost::spirit::istream_iterator end1;
pos_iterator begin(begin1, end1, argv[1]);
pos_iterator end;
typedef boost::wave::cpplexer::lex_token<> token_type;
typedef boost::wave::cpplexer::lex_iterator<token_type>
lex_iterator_type;
typedef boost::wave::context<pos_iterator, lex_iterator_type>
context_type;
context_type ctx(begin, end, argv[1]);
context_type::iterator_type preprocessedInputBegin = ctx.begin();
context_type::iterator_type preprocessedInputEnd = ctx.end();
---------------
Any ideas what am I missing?
Thanks,
-- Alex
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net