undefined reference to 'std::cxx11
时间: 2023-10-12 12:01:36 浏览: 200
c++ 17 std::filesystem for c++ 11 / c++ 14/ c++ 17/ c++ 20 on Windows, macOS, Linux和FreeBSD的实现。- gulrak /文件系统
5星 · 资源好评率100%
引用引用中提到的原因是因为使用了C++11的新特性,而旧版本的C库函数实现与C++11存在差异,导致编译器将其解释为std::__cxx11,从而出现了未定义错误。解决这个问题的方法是指定编译器的版本为g 4或gcc4,这样在编译时就不会发生上述问题。你可以尝试将编译器的版本更改为g 4或gcc4,然后重新编译代码。
引用<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [C++ VScode 自定义头文件报错,undefined reference to std::__cxx11::](https://blog.csdn.net/liu_feng_zi_/article/details/117439217)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [【报错】undefined reference to cv::imread(std::__cxx11::basic_string, std::char_traits, std::](https://blog.csdn.net/wss794/article/details/126531276)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文