c++ - /usr/local/include/string.h:25:10:致命错误:找不到“plist/Node.h”文件
问题描述
我试图在 MacOS 中用 C++ 运行一个 hello world 程序。尝试使用终端使用命令运行它g++ -o test.cpp test
它给了我上述错误。我是否需要以某种方式重新安装我的编译器,如果是,那么我该怎么做?
clang++ 和 g++ 和 gcc。我已经设置了xcode。
xcode-select --install
当我在某处阅读时,我也安装了。
我已经尝试了所有这些来运行程序。他们有这样的版本
clang++ -v
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
g++ -v
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
解决方案
该 g++ 命令是拼写错误还是您尝试将输出文件设置为 test.cpp?你是如何安装 g++ 的?
这是你得到的唯一错误吗?
/usr/local/include/string.h:25:10: fatal error: 'plist/Node.h' file not found
如果你跑步会发生什么
g++ -o test -Wall test.cpp
推荐阅读
- android - 在颤动中滚动Gridview时项目消失
- javascript - 如何在 CDN 链接中使用 google API 密钥获取 json 格式以获取用户的当前地址?
- git - 我不小心将带有 google 密钥的 .env 文件上传到 github,但编辑了文件并删除了密钥。可以在某处看到变化吗?
- node.js - 仅当数组中不存在对象时如何使用 $addToSet 添加新对象
- python - 使用scrapy进入下一页
- php - Mysqli准备好的语句没有在每个for循环帖子中获取正确的值
- php - 如何从自定义 wordpress 插件的上传文件夹中创建的自定义文件中删除文件
- php - AWS Lambda 错误:错误:运行时无法启动:fork/exec /opt/bootstrap:没有这样的文件或目录
- sapui5 - SAPUI5 在运行时将 operationMode 更改为 client
- jquery - 如何获取特定类的下一个所有元素?