威尼斯手机平台-电子正规官网登录首页

热门关键词: 威尼斯手机平台,威尼斯登录首页,威尼斯正规官网
中绑定了 std,之前代码中使用了opencv2.4.10
分类:新闻公告

D 语言 2.088.0 发布了,此版本共修复了 58 个 bug,并对编写翻译器引进了 27 项首要更正。

gcc6.3编写翻译c++11的前后相继链接opencv时字符型函数未定义,gcc6.3opencv

在Windows下编写制定图像处理程序,由于要动用regex,晋级了mingw,编写翻译c++11代码。此前代码中接纳了opencv2.4.10,一贯运营优异,进级编写翻译器今后发掘了不当:
undefined reference to `cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
原因:
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
Defining the following macro before including any standard library headers should fix your problem:
#define _GLIBCXX_USE_CXX11_ABI 0

在Windows下编制图像管理程序,由于要使用regex,晋级了mingw,编译c++11代码。之...

在Windows下编写制定图像管理程序,由于要使用regex,进级了mingw,编译c++11代码。以前代码中应用了opencv2.4.10,一向运维出色,晋级编写翻译器今后开采了错误:
undefined reference to `cv::imread(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
原因:
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
Defining the following macro before including any standard library headers should fix your problem:
#define _GLIBCXX_USE_CXX11_ABI 0

那是三个专门的学问日版本,并从未怎么更新亮点,大部分都以司空见惯维护,然而里面 C++ 互操作方面恐怕值得一提。

此版本分别在 DRuntime 模块 core.stdcpp.string 和 core.stdcpp.vector 中绑定了 std::string 和 std::vector,使得与 C++ 的互操作性得到了十分的大的改善。当中设有二个包容难题,供给静心。在 Linux 上编译时,当 D 使用 GCC 库和链接器,在应用切合 C++ 11 的现世版本的 std::string 时会现出包容性难点。它饱含三个里面指针,在 D 中既违规又与运动语义不相配。化解办法是将 -D_GLIBCXX_USE_CXX11_ABI = 0 传递给 G++ 并使用 -version = _GLIBCXX_USE_CXX98_ABI 编译 D 应用。

详细情况查看更新表达:

https://dlang.org/blog/2019/09/06/dmd-2-088-0-released

(文/开源中华夏族民共和国卡塔尔(قطر‎    

本文由威尼斯手机平台发布于新闻公告,转载请注明出处:中绑定了 std,之前代码中使用了opencv2.4.10

上一篇:没有了 下一篇:没有了
猜你喜欢
热门排行
精彩图文