c++ - 编译 C++ 程序的问题
问题描述
我正在尝试在我的新 Conda 环境中编译一个简单的 Hello World C++ 程序,但它返回一个退出状态,如下所示。
/home/ep/anaconda3/bin/../lib/gcc/x86_64-conda-linux-gnu/7.5.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
g++也安装好了,在anaconda3的lib目录下也可以找到libstdc++.so。
g++ (crosstool-NG 1.24.0.131_87df0e6_dirty) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
谁能建议我如何解决这个问题?
解决方案
您还需要安装库的开发文件libstdc++
例如,你在 Debian/Ubuntu
sudo apt install libstdc++-8-dev
推荐阅读
- android - 如何检查过滤后的 recyclerView 结果是否为空?
- sonos - 如何从 Sonos 家庭获取音乐源列表?
- python - 如何在python中对新的减去数据框进行进一步计算?
- firebase - 在我的代码中的云 Firestore 中创建新集合
- ruby-on-rails - 无法删除 Rails 中的孤立迁移文件
- office365 - Office 365 的自定义功能插件
- c# - asp.net 超链接 navigateurl 保留主机名
- javascript - 如何从 div 中“提取”css元素(即形成网格)
- android - 错误:文件 google-services.json 丢失。(因为 com.google.gms:google-services 从 4.2.0 更新到 4.3.0)
- r - 从 R 数据框中删除负值和一个正值