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

#### 错误信息

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

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


#### 问题介绍

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


#### 解决方案

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