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. – Damianoc++11
– Aldermantypedef __cxx11::basic_string basic_string
somewhere instd
namespace of the string header. Do you compile the compilation unit containingH5::CompType
as well? – Damianogcc
instead ofg++
to compile... – Adversative