1

These are my (ones of the many) steps in order to build list_includes example, leading to nowhere:

  1. Download the latest boost from the official site (currently it's 1.67.0, but I also tried 1.66.0), extract it

  2. $ ./bootstrap.sh

  3. $ ./b2 --with-wave --with-program_options --with-filesystem --with-system --with-thread --with-date_time

    I took these dependencies from the Jamfile inside the build directory

  4. $ ./b2 install

  5. $ cd libs/wave/samples/list_includes/build

    Just for demonstrating the path

  6. $ ../../../../../b2

or

  1. $ cd libs/wave/samples/list_includes
  2. $ g++ -o list_includes list_includes.cpp -lboost_wave -lboost_program_options -lboost_filesystem -lboost_system -lboost_thread -lboost_date_time

No matter how I do it, I get this (template arguments are omitted for the sake of readability):

undefined reference to `boost::wave::cpplexer::lexertl::new_lexer_gen<>::new_lexer(__gnu_cxx::__normal_iterator<> const&, __gnu_cxx::__normal_iterator<> const&, boost::wave::util::file_position<> const&, boost::wave::language_support)' collect2: error: ld returned 1 exit status

Now I don't understand why it's complaining about cpplexer as it's the part of the library itself - and the library is built and specified in the command line! Thanks for any help/advice.

qpmm
  • 31
  • 7
  • @πάνταῥεῖ I'm stuck with this myself. I'd appreciate if you shared your solution. – sehe Jul 29 '18 at 23:34
  • 1
    @sehe I posted my solution – qpmm Aug 02 '18 at 19:41
  • Thank you so much for identifying this issue. We have (separately) repaired the problem - I just happened to Google it :( Next time try filing an issue [here](https://github.com/boostorg/wave/issues). In the meantime, is `list_includes` working for you? – Jeff Trull Mar 07 '20 at 04:51

1 Answers1

2

Solved this nightmare... The traitor is lexertl_interface.hpp !

Insert in there the following include: #include <boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp>

And change lines 70-71:

return new_lexer_gen::new_lexer(first, last, pos, language);

to:

return boost::wave::cpplexer::new_lexer_gen::new_lexer(first, last, pos, language);

qpmm
  • 31
  • 7