Boost logo

Boost :

From: David A. Greene (greened_at_[hidden])
Date: 2002-05-21 10:02:02


John Maddock wrote:
>>I can't seem to be able to compile a test program with
>>the boost_regex library. I get the following error
>>message:
>>
>>---
>>/tmp/cc9r42Gv.o: In function
>>`boost::reg_expression<char,
>>boost::regex_traits<char>, allocator<char>
>>
>>>::fail(unsigned int)':
>>
>>/tmp/cc9r42Gv.o(.boost::reg_expression<char,
>>boost::regex_traits<char>, allocator<char>
>>
>>>::gnu.linkonce.t.fail(unsigned int)+0x4e): undefined
>>
>>reference to
>>`boost::bad_expression::bad_expression(basic_string<char,
>>string_char_traits<char>,
>>__default_alloc_template<true, 0> > const &)'
>
>
> To be honest I don't understand that error, those aren't the usual undefined
> references you would expect - you are clearly linking to the regex library
> OK, but are getting undefined references to *inline* functions from the
> regex headers. Are there any g++ options that effect this? Did you do
> anything different/unusual when you built the library?

Just as an additional point of information, I also have had
some linker problems with regex. The original message didn't
contain all of the error messages, but what was given
corresponds to what I'm seeing. I also get undefined
reference for a lot of std library stuff (such
as_STL::ios_base::_Loc_init::_Loc_init(void)) and g++
runtime stuff (such as __static_initialization_and_destruction_0).

This is on a Debian Linux system using the Debian Boost 1.27
packages. I'm not sure if the original reporter uses the same
system. It could be a packaging problem, but I have absolutely
no solid evidence to back that up. The undefined references to
std library and g++ runtime point me in that direction, though.
The library may have been built incorrectly. I didn't have time
to thoroughly debug the problem (and I won't until late June) but
I thought I would pass this on in case it helps. I thought about
filing a report in the Debian bug tracking system but I didn't
want to clutter that up until I have more information.

                         -Dave

-- 
"Some little people have music in them, but Fats, he was all music,
  and you know how big he was."  --  James P. Johnson

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk