I use c++11, but also some libraries that are not configured for it, and need some type conversion. In particular I need a way to convert std::__cxx11::string
to regular std::string
, but googling I can't find a way to do this and putting (string)
in front does not work.
If I do not convert I get linker errors like this:
undefined reference to `H5::CompType::insertMember(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, H5::DataType const&) const'
insertMember()
method. – Matthäus Brandl Oct 28 '15 at 15:22c++11
– jorgen Oct 28 '15 at 15:24typedef __cxx11::basic_string basic_string
somewhere instd
namespace of the string header. Do you compile the compilation unit containingH5::CompType
as well? – Matthäus Brandl Oct 28 '15 at 15:28gcc
instead ofg++
to compile... – Aaron Franke Mar 10 '19 at 7:42