您现在的位置是:首页 >技术杂谈 >mac环境VSCode 配置C++,并写Hello World网站首页技术杂谈
mac环境VSCode 配置C++,并写Hello World
简介mac环境VSCode 配置C++,并写Hello World
- 安装VSCode,点击下载链接,下载Mac版本的vscode。
- 安装“C++ extension for VS Code”,在扩展 (⇧⌘X)中搜索c++,并安装

- 确保CLANG安装成功。在mac的终端下输入
clang --version,如果安装成功会打印相关信息,未成功输入“xcode-select --install”安装CLANG。 - 安装从命令行打开VSCode的命令。
打开Command Palette (Cmd+Shift+P),输入’shell command’,之后选择安装,之后退出Mac终端再进入终端,输入.code 就可以在该文件夹下打开VSCode了。原文如下
Launch VS Code. Open the Command Palette (Cmd+Shift+P) and type ‘shell command’ to find the Shell Command: Install ‘code’ command in PATH
command. macOS shell commands
Restart the terminal for the new $PATH value to take effect. You’ll be
able to type ‘code .’ in any folder to start editing files in that
folder.
- 编写Hello World,直接参考https://code.visualstudio.com/docs/languages/cpp
本文参考:
- https://code.visualstudio.com/docs/cpp/config-clang-mac
- https://code.visualstudio.com/docs/languages/cpp
- https://code.visualstudio.com/docs/setup/mac
风语者!平时喜欢研究各种技术,目前在从事后端开发工作,热爱生活、热爱工作。






U8W/U8W-Mini使用与常见问题解决
QT多线程的5种用法,通过使用线程解决UI主界面的耗时操作代码,防止界面卡死。...
stm32使用HAL库配置串口中断收发数据(保姆级教程)
分享几个国内免费的ChatGPT镜像网址(亲测有效)
Allegro16.6差分等长设置及走线总结