c++ - 将 C++ 编译器从 Ubuntu 更改为 MacOS
问题描述
这个学期我在大学里有 C++ 课程。由于编译的原因,他们要求我们在学期任务中使用 Ubuntu。
我有 Mac 操作系统。我可以将编译器更改为与 Ubuntu 的相同吗?
谢谢。
解决方案
I don't have much experience with MacOS, but as far as I'm concerned, when you install XCode
it automatically installs g++
, which is a compiler you can use on Linux and Windows (with mingw).
Also, if you don't want to install XCode, you can get gcc
/ g++
through homebrew
: https://brew.sh/
Another alternative would be clang
/ clang++
.
推荐阅读
- java - Spring Boot 缓存列表
- python - python在文本tkinter中插入字符串列表时在每一行添加{}
- openssl - 将 PHP AES 加密从 mcrypt 迁移到 openssl 返回不同的加密字符串
- c# - 在asp.net中提交webform之前,如何根据动态选择的单选按钮显示或隐藏动态文本框?
- raspberry-pi - 构建更小尺寸的树莓派镜像
- css - WordPress 查询图像大小
- angular - Angular自定义验证器突出显示字段,但未设置的无效性
- java - Java MouseListener 还检测来自机器人类的点击
- python - 将 plotly html 图恢复为 polty 对象以在破折号中使用
- javascript - 使用 mysql 查询结果数据填充模式