---
title: 系统libstdc++库版本过低导致符号未定义或运行结果错误
description: "无法找到高版本C++标准库函数定义的接口："
url: https://www.hikunpeng.com/document/detail/zh/kunpengdevps/compilation/ug-bisheng/kunpengbisheng_06_0042.html
sourcePath: /source/zh/kunpengdevps/compilation/ug-bisheng/kunpengbisheng_06_0042.html
indexId: 84ee8c399befa844e5e49d9676888979c95394cd204f91e46bf654bf3ff762f174
---
# 系统libstdc++库版本过低导致符号未定义或运行结果错误

#### 错误信息

无法找到高版本C++标准库函数定义的接口：

```
undefined reference to `std::xxx`
```


#### 问题介绍

Clang默认使用系统路径下的libstc++.so动态库，过低的系统libstdc++.so库版本可能不支持用户代码中使用的高版本特性，导致链接时出现未定义符号或运行结果错误。


#### 解决方案

链接时加入-stdlib=libc++或-lc++选项，使用Clang提供的libc++.so库中提供的标准C++库实现。
