久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

將 std::__cxx11::string 轉(zhuǎn)換為 std::string

Converting std::__cxx11::string to std::string(將 std::__cxx11::string 轉(zhuǎn)換為 std::string)
本文介紹了將 std::__cxx11::string 轉(zhuǎn)換為 std::string的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我用的是c++11,但也有一些庫沒有為它配置,需要一些類型轉(zhuǎn)換.特別是我需要一種將 std::__cxx11::string 轉(zhuǎn)換為常規(guī) std::string 的方法,但是谷歌搜索我找不到這樣做的方法并把前面的(string)不起作用.

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.

如果我不轉(zhuǎn)換,我會收到這樣的鏈接器錯誤:

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'

推薦答案

您是否可能使用 GCC 5?

Is it possible that you are using GCC 5?

如果您收到有關(guān)未定義引用符號的鏈接器錯誤,這些符號涉及 std::__cxx11 命名空間或標記 [abi:cxx11] 中的類型,那么這可能表明您正在嘗試將使用不同值編譯的目標文件鏈接在一起對于 _GLIBCXX_USE_CXX11_ABI 宏.當鏈接到使用舊版 GCC 編譯的第三方庫時,通常會發(fā)生這種情況.如果無法使用新 ABI 重建第三方庫,則需要使用舊 ABI 重新編譯代碼.

If you get linker errors about undefined references to symbols that involve types in the std::__cxx11 namespace or the tag [abi:cxx11] then it probably indicates that you are trying to link together object files that were compiled with different values for the _GLIBCXX_USE_CXX11_ABI macro. This commonly happens when linking to a third-party library that was compiled with an older version of GCC. If the third-party library cannot be rebuilt with the new ABI then you will need to recompile your code with the old ABI.

來源:GCC 5 發(fā)行說明/雙 ABI

定義以下宏之前包括任何標準庫頭應(yīng)該可以解決您的問題:#define _GLIBCXX_USE_CXX11_ABI 0

Defining the following macro before including any standard library headers should fix your problem: #define _GLIBCXX_USE_CXX11_ABI 0

這篇關(guān)于將 std::__cxx11::string 轉(zhuǎn)換為 std::string的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

boost_1_60_0 .zip installation in windows(Windows 中的 boost_1_60_0 .zip 安裝)
How do I get console output in C++ with a Windows program?(如何使用 Windows 程序在 C++ 中獲得控制臺輸出?)
How do I calculate the week number given a date?(如何計算給定日期的周數(shù)?)
OpenCV with Network Cameras(帶有網(wǎng)絡(luò)攝像機的 OpenCV)
Export all symbols when creating a DLL(創(chuàng)建 DLL 時導出所有符號)
Getting started with OpenCV 2.4 and MinGW on Windows 7(Windows 7 上的 OpenCV 2.4 和 MinGW 入門)
主站蜘蛛池模板: 美女福利网站 | 欧美国产日韩在线 | 91成人免费版| 国产91页 | 亚洲成人二区 | 久久免费国产视频 | 成人免费毛片aaaaaa片 | 怡红院在线播放 | 亚洲成人免费 | 伊人成人在线视频 | 中文字幕精品视频 | 欧美成人三级 | 久久天天躁狠狠躁夜夜躁2014 | 黄色大片在线播放 | 日韩精品在线观看视频 | 成人免费黄色大片 | 青青草原国产 | 波多野结衣视频在线 | 午夜免费剧场 | 亚洲欧美另类在线 | 日韩新片王网 | 国产精品久久久久久久久久久久久久久 | 久久久国产精品人人片 | 国产91在线播放 | 欧美a级黄色片 | 一区二区三区成人 | 久久精品国产成人av | 97精品在线 | 国产又爽又黄免费视频 | 日韩视频在线免费观看 | 国产精品手机在线观看 | 欲望岛av| 91精品国产日韩91久久久久久 | 国产又粗又大又硬 | 亚洲精品午夜 | 免费一级黄色片 | 国产成人在线视频 | 久久久精品一区二区 | 亚洲免费看片 | 国产精品九九九九 | 国产黄网 |