Skip to content

Commit 9c19ebb

Browse files
committed
update (docs): add env-configuration
1 parent b2f98e0 commit 9c19ebb

10 files changed

Lines changed: 87 additions & 6 deletions

File tree

docs/.vuepress/collections.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,30 @@ export default defineCollections([
3535
sidebar: [
3636
{
3737
text: '通用',
38-
items: ['', 'install', 'folder-and-explorer', 'cli'],
38+
items: ['', 'install', 'folder-and-explorer', 'terminal'],
3939
},
4040
{
4141
text: '专门配置',
42-
items: ['python'],
42+
items: ['python', 'cpp'],
43+
},
44+
],
45+
}),
46+
defineCollection({
47+
type: 'doc',
48+
dir: 'env-configuration',
49+
linkPrefix: '/env-configuration',
50+
title: '开发环境配置',
51+
sidebar: [
52+
{ text: 'Python', link: 'https://python.yxzl.dev/jvvxy8eb/' },
53+
{
54+
text: 'C++',
55+
items: [
56+
'mingw64',
57+
{
58+
text: 'VS Code 配置',
59+
link: '/vscode/y0zhl0fe/',
60+
},
61+
],
4362
},
4463
],
4564
}),

docs/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ config:
1010
tagline: 一个尝试帮助新手快速上手编程和信息技术的文档
1111
image: null
1212
actions:
13-
- theme: brand
14-
text: 文档
15-
link: /post/
13+
# - theme: brand
14+
# text: 文档
15+
# link: /post/
1616
- theme: alt
1717
text: GitHub →
1818
link: https://github.com/QingdaoAcademy/docs

docs/env-configuration/mingw64.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: MingW64 g++ 环境配置
3+
createTime: 2025/10/23 12:49:45
4+
permalink: /env-configuration/jxl5spat/
5+
---
6+
7+
## 测试
8+
9+
如果你安装过一些 C++ IDE,或者使用 MacOS 系统,你的电脑很可能已经安装好了 g++ 编译器。
10+
11+
请先打开命令行工具,输入 `g++`,来检查是否已经安装 g++ 编译器。如果你看到以 `... error: no input files` 结尾的提示,说明你已经安装好了 g++ 编译器,可以跳过这部分内容。
12+
13+
==下面介绍的是 Windows 的安装方法==。
14+
15+
## 下载和解压
16+
17+
你可以通过[此链接](https://winlibs.com/#download-release)下载压缩包。如果没有特殊情况,请选择 ==Win64== 和 ==Zip archive== 版本。
18+
19+
![](../images/1761195383983.png)
20+
21+
如果上述链接无法打开或下载缓慢,你也可以使用我们提供的备用链接进行下载(更新时间:2025.10.23):
22+
23+
- [备用链接1](https://cloud.yixiangzhilv.com/s/QvMUN)
24+
- [备用链接2](https://cloud.yxzl.dev/s/QvMUN)
25+
26+
下载完成后,解压缩该压缩包到你喜欢的位置,例如 `D:\MinGW64`。请按下图所示的方法复制当前路径:
27+
28+
![](../images/1761196611590.png)
29+
30+
## 配置环境变量
31+
32+
然后进行Path设置:
33+
34+
- 对于部分 Windows 10 及更高版本:依次打开设置,系统,关于,高级系统选项(全屏状态下处于右上角)
35+
- 对于更低版本:右键此电脑,属性,高级系统设置(处于左侧一列排布的内容中)
36+
37+
紧接着打开环境变量配置窗口,并在系统变量中选择Path
38+
39+
![](../images/1761196556725.png)
40+
41+
双击打开 Path,添加一条,内容为你刚刚复制的路径 + `\bin`,例如 `D:\MinGW64\bin`
42+
43+
![](../images/1761196653901.png)
44+
45+
此时,请你重启电脑(为防止不必要的麻烦,非必需操作),然后重复[开头的操作](#测试)检测 g++ 是否安装成功。

docs/images/1761195383983.png

34.1 KB
Loading

docs/images/1761196556725.png

111 KB
Loading

docs/images/1761196611590.png

38.7 KB
Loading

docs/images/1761196653901.png

22 KB
Loading

docs/vscode/cpp.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: C++ 开发环境配置
3+
createTime: 2025/10/23 12:49:45
4+
permalink: /vscode/y0zhl0fe/
5+
---
6+
7+
阅读本节内容前,请确保你已经正确配置了 C++ 环境。否则,请阅读[MingW64 g++ 环境配置](/env-configuration/jxl5spat/)
8+
9+
请确保你已经阅读前几节内容,正确配置了 Code Runner,并且了解了什么是 VS Code 终端。
10+
11+
从插件市场安装来自 Microsoft 的 C/C++ Extension Pack 插件包。这些插件可以帮助你完成 C++ 的补全提示、代码高亮、类型推导等等。
12+
13+
然后,你可以打开任何一个以 `.cpp` 结尾的文件,按下 `Ctrl + Alt + N`(Mac 为 `command + option + N`)运行代码。如果一切顺利,你将会在终端窗口中看到代码的输出结果。
14+
15+
如果你的代码需要用户输入,你需要先单击终端,然后输入内容。

docs/vscode/python.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ createTime: 2025/10/23 10:54:46
44
permalink: /vscode/4uja7z83/
55
---
66

7+
阅读本节内容前,请确保你已经安装了 Python 环境。否则,请阅读[Python 环境安装 | Python 入门文档](https://python.yxzl.dev/jvvxy8eb/)
8+
79
## 安装 Python 插件
810

911
打开插件安装界面,然后搜索 `Python`,找到由 Microsoft 出品的插件后点击安装:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 命令行工具
2+
title: VS Code 终端
33
createTime: 2025/10/23 11:33:31
44
permalink: /vscode/34n3lfdz/
55
---

0 commit comments

Comments
 (0)