Boost logo

Boost Users :

Subject: Re: [Boost-users] Project link error with Wave on OSX
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2014-02-25 12:52:20


> I've just updated a project that was working under XCode 4 with boost
> 1.48 to XCode 5 and boost 1.55 (installed with MacPorts). Now I have a
> link error with Wave which wasn't the case before. This somehow baffles me
> as I thought everything was template based.

The wave libraries contain code for pre-instantiated templates only. If you
instantiate the templates yourself you will not need to link with the
libraries.

Also, do the examples/the wave driver tool compile and link properly?

> I am also linking with
> libboost-wave.mt.a but that doesn't solve the problem. The linker
> errors are, among 6 others:
>
> Undefined symbols for architecture x86_64:
> "boost::wave::cpplexer::new_lexer_gen<__gnu_cxx::__normal_iterator<char*,
> std::string>,
> 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<cha
> r,
>
> 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<cha
> r,
>
> std::allocator<char> >, char*> > > >
> >::new_lexer(__gnu_cxx::__normal_iterator<char*, std::string> const&,
> __gnu_cxx::__normal_iterator<char*, std::string> 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<cha
> r,
> std::allocator<char> >, char*> > > const&,
> boost::wave::language_support)", referenced from:
>
> I've tried forcing std::string as the BOOST_WAVE_STRINGTYPE, but that just
> changes the signatures of the undefined symbols. I fail to see what has
> changed and I am completely stuck. I would have understood if I had a
> compiler error but this is a link error. Is this something to do with the
> standard C++ library? For my project, C++ dialect is C++98 and the
> standard library is libstdc++.

If you change BOOST_WAVE_STRINGTYPE it has to be done while compiling the
wave libraries and while compiling your code.

Regards Hartmut
---------------
http://boost-spirit.com
http://stellar.cct.lsu.edu


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