Converting std::__cxx11::string to std::string

后端 未结 8 1860
春和景丽
春和景丽 2020-11-22 16:07

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 t

8条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 17:03

    I had a similar issue recently while trying to link with the pre-built binaries of hdf5 version 1.10.5 on Ubuntu 16.04. None of the solutions suggested here worked for me, and I was using g++ version 9.1. I found that the best solution is to build the hdf5 library from source. Do not use the pre-built binaries since these were built using gcc 4.9! Instead, download the source code archives from the hdf website for your particular distribution and build the library. It is very easy.

    You will also need the compression libraries zlib and szip from here and here, respectively, if you do not already have them on your system.

提交回复
热议问题