Boost Users :
Subject: [Boost-users] stlport string vs. std string causing link errors - how to workaround?
From: Chris Kruger (chris.kruger_at_[hidden])
Date: 2009-05-30 20:46:30
I'm a relatively new user of boost and I have a problem. I believe I
know what is causing the problem but I don't yet have a solution and I
am looking for suggestions.
I'm currently porting a product to Mac OSX. It makes use of both
stlport and boost. I have got the software compiling happily enough
but I have a couple of link errors that have stumped me for a bit.
I believe the link problems are caused by the fact that boost was
compiled using the stdlib included with gcc and the code in the
product is using stlport. The boost methods causing problems both have
stl strings in their arguments. The exact link errors I get is:
1. "boost::filesystem::detail::dir_itr_first(void*&, void*&,
stlpmtx_std::allocator<char> > const&, stlpmtx_std::basic_string<char,
stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> >&,
stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&,
As you can see the linker is looking for methods that are using
stlpmtx_std::basic_string ... i.e. the stlport string
The library libboost_filesystem-xgcc40-1_36.dylib as expected contains
these basic methods (confirmed by "nm
libboost_filesystem-xgcc40-1_36.dylib") but no doubt with std::string
I'm using boost 1_36 if that makes any difference and am quite happy
to test any assumptions if you don't trust mine.
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