Boost logo

Boost Users :

From: Aaron Nauman (nauman_at_[hidden])
Date: 2005-02-14 08:57:34


I have upgraded by stlport libs to 4.6.2 (from 4.5) and boost libs to
1_32_0 (from 1_26_0). I am getting odd linking errors in the regex
library.

I am on vc6 sp5 and linking dynamically.

If I have something like this in the code, it links fine

  boost::regex test("foo");

But if I use an std::string, I get link errors. For example, this code

  std::string testStr("bar");
  boost::regex test(testStr);

Produces link errors

vc.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: unsigned int __fastcall
boost::reg_expression<char,class boost::regex_traits<char>,class
boost::detail::allocator_adapter<char,class boost::detail::simple_alloc>
>::se
t_expression(class _STL::basic_string<char,class
_STL::char_traits<char>,class _STL::allocator<char> > const &,unsigned
int)"
(__imp_?set_expression@?$reg_expression_at_DV?$regex_traits_at_D@boost@@V?$all
ocator_adapter_at_DVsimple_alloc_at_detail@boost@@@detail
@2@@boost@@QAIIABV?$basic_string_at_DV?$char_traits_at_D@_STL@@V?$allocator_at_D@
2@@_STL@@I_at_Z)

I dumped the exports for the library and there is mismatch in _STL and
std namespaces. This is what I see in the new library

        323 142 00026E00
?set_expression@?$reg_expression_at_DV?$regex_traits_at_D@boost@@V?$allocator_
adapter_at_DVsimple_alloc_at_detail@boost@@@detail_at_2@@boost@@QAIIABV?$basic_st
ring_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@std@@I_at_Z

The only difference seems to be _STL versus std. I know the std
renaming is an stlport feature, but I am not sure where to go from here.

If I look back into my old regex library, although the interfaces have
changed, I see references to _STL, not std.

Here is old library export (notice _STL)

         61 3C 000010B0
?Grep_at_RegEx@boost@@QAEIAAV?$vector_at_IV?$allocator_at_I@_STL@@@_STL@@ABV?$bas
ic_string_at_DV?$char_traits_at_D@_STL@@V?$allocator_at_D@2@@4_at_I@Z

Versus the new library export (notice std)

        100 63 000010E0
?Grep_at_RegEx@boost@@QAEIAAV?$vector_at_IV?$allocator_at_I@std@@@std@@ABV?$basic
_string_at_DU?$char_traits_at_D@std@@V?$allocator_at_D@2@@4_at_K@Z

Can someone please help me figure out how to get these consistent.
Thanks!

Aaron


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