|
|
|
@ -3156,72 +3156,85 @@
|
|
|
|
|
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#1-vscode" class="md-nav__link">
|
|
|
|
|
1. VSCode
|
|
|
|
|
<a href="#1611-ide" class="md-nav__link">
|
|
|
|
|
16.1.1 安装 IDE
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#2-java" class="md-nav__link">
|
|
|
|
|
2. Java 环境
|
|
|
|
|
<a href="#1612" class="md-nav__link">
|
|
|
|
|
16.1.2 安装语言环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<nav class="md-nav" aria-label="16.1.2 安装语言环境">
|
|
|
|
|
<ul class="md-nav__list">
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#1-python" class="md-nav__link">
|
|
|
|
|
1. Python 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#3-cc" class="md-nav__link">
|
|
|
|
|
3. C/C++ 环境
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#2-cc" class="md-nav__link">
|
|
|
|
|
2. C/C++ 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#4-python" class="md-nav__link">
|
|
|
|
|
4. Python 环境
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#3-java" class="md-nav__link">
|
|
|
|
|
3. Java 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#4-c" class="md-nav__link">
|
|
|
|
|
4. C# 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#5-go" class="md-nav__link">
|
|
|
|
|
5. Go 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#6-javascript" class="md-nav__link">
|
|
|
|
|
6. JavaScript 环境
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#6-swift" class="md-nav__link">
|
|
|
|
|
6. Swift 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#7-c" class="md-nav__link">
|
|
|
|
|
7. C# 环境
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#7-javascript" class="md-nav__link">
|
|
|
|
|
7. JavaScript 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#8-swift" class="md-nav__link">
|
|
|
|
|
8. Swift 环境
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#8-dart" class="md-nav__link">
|
|
|
|
|
8. Dart 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#9-dart" class="md-nav__link">
|
|
|
|
|
9. Dart 环境
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#9-rust" class="md-nav__link">
|
|
|
|
|
9. Rust 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#10-rust" class="md-nav__link">
|
|
|
|
|
10. Rust 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
@ -3369,72 +3382,85 @@
|
|
|
|
|
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#1-vscode" class="md-nav__link">
|
|
|
|
|
1. VSCode
|
|
|
|
|
<a href="#1611-ide" class="md-nav__link">
|
|
|
|
|
16.1.1 安装 IDE
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#2-java" class="md-nav__link">
|
|
|
|
|
2. Java 环境
|
|
|
|
|
<a href="#1612" class="md-nav__link">
|
|
|
|
|
16.1.2 安装语言环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<nav class="md-nav" aria-label="16.1.2 安装语言环境">
|
|
|
|
|
<ul class="md-nav__list">
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#1-python" class="md-nav__link">
|
|
|
|
|
1. Python 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#3-cc" class="md-nav__link">
|
|
|
|
|
3. C/C++ 环境
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#2-cc" class="md-nav__link">
|
|
|
|
|
2. C/C++ 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#4-python" class="md-nav__link">
|
|
|
|
|
4. Python 环境
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#3-java" class="md-nav__link">
|
|
|
|
|
3. Java 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#4-c" class="md-nav__link">
|
|
|
|
|
4. C# 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#5-go" class="md-nav__link">
|
|
|
|
|
5. Go 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#6-javascript" class="md-nav__link">
|
|
|
|
|
6. JavaScript 环境
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#6-swift" class="md-nav__link">
|
|
|
|
|
6. Swift 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#7-c" class="md-nav__link">
|
|
|
|
|
7. C# 环境
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#7-javascript" class="md-nav__link">
|
|
|
|
|
7. JavaScript 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#8-swift" class="md-nav__link">
|
|
|
|
|
8. Swift 环境
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#8-dart" class="md-nav__link">
|
|
|
|
|
8. Dart 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#9-dart" class="md-nav__link">
|
|
|
|
|
9. Dart 环境
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#9-rust" class="md-nav__link">
|
|
|
|
|
9. Rust 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
|
|
|
<a href="#10-rust" class="md-nav__link">
|
|
|
|
|
10. Rust 环境
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
@ -3494,24 +3520,38 @@
|
|
|
|
|
|
|
|
|
|
<!-- Page content -->
|
|
|
|
|
<h1 id="161">16.1 编程环境安装<a class="headerlink" href="#161" title="Permanent link">¶</a></h1>
|
|
|
|
|
<h3 id="1-vscode">1. VSCode<a class="headerlink" href="#1-vscode" title="Permanent link">¶</a></h3>
|
|
|
|
|
<p>本书推荐使用开源、轻量的 VSCode 作为本地 IDE ,下载并安装 <a href="https://code.visualstudio.com/">VSCode</a> 。</p>
|
|
|
|
|
<h3 id="2-java">2. Java 环境<a class="headerlink" href="#2-java" title="Permanent link">¶</a></h3>
|
|
|
|
|
<h2 id="1611-ide">16.1.1 安装 IDE<a class="headerlink" href="#1611-ide" title="Permanent link">¶</a></h2>
|
|
|
|
|
<p>推荐使用开源、轻量的 VSCode 作为本地集成开发环境(IDE)。访问 <a href="https://code.visualstudio.com/">VSCode 官网</a>,根据操作系统选择相应版本的 VSCode 进行下载和安装。</p>
|
|
|
|
|
<p><a class="glightbox" href="../installation.assets/vscode_installation.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="从官网下载 VSCode" class="animation-figure" src="../installation.assets/vscode_installation.png" /></a></p>
|
|
|
|
|
<p align="center"> 图 16-1 从官网下载 VSCode </p>
|
|
|
|
|
|
|
|
|
|
<p>VSCode 拥有强大的扩展包生态系统,支持大多数编程语言的运行和调试。以 Python 为例,安装“Python Extension Pack”扩展包之后,即可进行 Python 代码调试。安装步骤如图 16-2 所示。</p>
|
|
|
|
|
<p><a class="glightbox" href="../installation.assets/vscode_extension_installation.png" data-type="image" data-width="100%" data-height="auto" data-desc-position="bottom"><img alt="安装 VSCode 扩展包" class="animation-figure" src="../installation.assets/vscode_extension_installation.png" /></a></p>
|
|
|
|
|
<p align="center"> 图 16-2 安装 VSCode 扩展包 </p>
|
|
|
|
|
|
|
|
|
|
<h2 id="1612">16.1.2 安装语言环境<a class="headerlink" href="#1612" title="Permanent link">¶</a></h2>
|
|
|
|
|
<h3 id="1-python">1. Python 环境<a class="headerlink" href="#1-python" title="Permanent link">¶</a></h3>
|
|
|
|
|
<ol>
|
|
|
|
|
<li>下载并安装 <a href="https://jdk.java.net/18/">OpenJDK</a>(版本需满足 > JDK 9)。</li>
|
|
|
|
|
<li>在 VSCode 的插件市场中搜索 <code>java</code> ,安装 Extension Pack for Java 。</li>
|
|
|
|
|
<li>下载并安装 <a href="https://docs.conda.io/en/latest/miniconda.html">Miniconda3</a> ,需要 Python 3.10 或更新版本。</li>
|
|
|
|
|
<li>在 VSCode 的插件市场中搜索 <code>python</code> ,安装 Python Extension Pack 。</li>
|
|
|
|
|
<li>(可选)在命令行输入 <code>pip install black</code> ,安装代码格式化工具。</li>
|
|
|
|
|
</ol>
|
|
|
|
|
<h3 id="3-cc">3. C/C++ 环境<a class="headerlink" href="#3-cc" title="Permanent link">¶</a></h3>
|
|
|
|
|
<h3 id="2-cc">2. C/C++ 环境<a class="headerlink" href="#2-cc" title="Permanent link">¶</a></h3>
|
|
|
|
|
<ol>
|
|
|
|
|
<li>Windows 系统需要安装 <a href="https://sourceforge.net/projects/mingw-w64/files/">MinGW</a>(<a href="https://blog.csdn.net/qq_33698226/article/details/129031241">配置教程</a>);MacOS 自带 Clang ,无须安装。</li>
|
|
|
|
|
<li>在 VSCode 的插件市场中搜索 <code>c++</code> ,安装 C/C++ Extension Pack 。</li>
|
|
|
|
|
<li>(可选)打开 Settings 页面,搜索 <code>Clang_format_fallback Style</code> 代码格式化选项,设置为 <code>{ BasedOnStyle: Microsoft, BreakBeforeBraces: Attach }</code> 。</li>
|
|
|
|
|
</ol>
|
|
|
|
|
<h3 id="4-python">4. Python 环境<a class="headerlink" href="#4-python" title="Permanent link">¶</a></h3>
|
|
|
|
|
<h3 id="3-java">3. Java 环境<a class="headerlink" href="#3-java" title="Permanent link">¶</a></h3>
|
|
|
|
|
<ol>
|
|
|
|
|
<li>下载并安装 <a href="https://docs.conda.io/en/latest/miniconda.html">Miniconda3</a> ,需要 Python 3.10 或更新版本。</li>
|
|
|
|
|
<li>在 VSCode 的插件市场中搜索 <code>python</code> ,安装 Python Extension Pack 。</li>
|
|
|
|
|
<li>(可选)在命令行输入 <code>pip install black</code> ,安装代码格式化工具。</li>
|
|
|
|
|
<li>下载并安装 <a href="https://jdk.java.net/18/">OpenJDK</a>(版本需满足 > JDK 9)。</li>
|
|
|
|
|
<li>在 VSCode 的插件市场中搜索 <code>java</code> ,安装 Extension Pack for Java 。</li>
|
|
|
|
|
</ol>
|
|
|
|
|
<h3 id="4-c">4. C# 环境<a class="headerlink" href="#4-c" title="Permanent link">¶</a></h3>
|
|
|
|
|
<ol>
|
|
|
|
|
<li>下载并安装 <a href="https://dotnet.microsoft.com/en-us/download">.Net 8.0</a> 。</li>
|
|
|
|
|
<li>在 VSCode 的插件市场中搜索 <code>C# Dev Kit</code> ,安装 C# Dev Kit (<a href="https://code.visualstudio.com/docs/csharp/get-started">配置教程</a>)。</li>
|
|
|
|
|
<li>也可使用 Visual Studio(<a href="https://learn.microsoft.com/zh-cn/visualstudio/install/install-visual-studio?view=vs-2022">安装教程</a>)。</li>
|
|
|
|
|
</ol>
|
|
|
|
|
<h3 id="5-go">5. Go 环境<a class="headerlink" href="#5-go" title="Permanent link">¶</a></h3>
|
|
|
|
|
<ol>
|
|
|
|
@ -3519,29 +3559,23 @@
|
|
|
|
|
<li>在 VSCode 的插件市场中搜索 <code>go</code> ,安装 Go 。</li>
|
|
|
|
|
<li>按快捷键 <code>Ctrl + Shift + P</code> 呼出命令栏,输入 go ,选择 <code>Go: Install/Update Tools</code> ,全部勾选并安装即可。</li>
|
|
|
|
|
</ol>
|
|
|
|
|
<h3 id="6-javascript">6. JavaScript 环境<a class="headerlink" href="#6-javascript" title="Permanent link">¶</a></h3>
|
|
|
|
|
<h3 id="6-swift">6. Swift 环境<a class="headerlink" href="#6-swift" title="Permanent link">¶</a></h3>
|
|
|
|
|
<ol>
|
|
|
|
|
<li>下载并安装 <a href="https://www.swift.org/download/">Swift</a> 。</li>
|
|
|
|
|
<li>在 VSCode 的插件市场中搜索 <code>swift</code> ,安装 <a href="https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang">Swift for Visual Studio Code</a> 。</li>
|
|
|
|
|
</ol>
|
|
|
|
|
<h3 id="7-javascript">7. JavaScript 环境<a class="headerlink" href="#7-javascript" title="Permanent link">¶</a></h3>
|
|
|
|
|
<ol>
|
|
|
|
|
<li>下载并安装 <a href="https://nodejs.org/en/">node.js</a> 。</li>
|
|
|
|
|
<li>在 VSCode 的插件市场中搜索 <code>javascript</code> ,安装 JavaScript (ES6) code snippets 。</li>
|
|
|
|
|
<li>(可选)在 VSCode 的插件市场中搜索 <code>Prettier</code> ,安装代码格式化工具。</li>
|
|
|
|
|
</ol>
|
|
|
|
|
<h3 id="7-c">7. C# 环境<a class="headerlink" href="#7-c" title="Permanent link">¶</a></h3>
|
|
|
|
|
<ol>
|
|
|
|
|
<li>下载并安装 <a href="https://dotnet.microsoft.com/en-us/download">.Net 8.0</a> 。</li>
|
|
|
|
|
<li>在 VSCode 的插件市场中搜索 <code>C# Dev Kit</code> ,安装 C# Dev Kit (<a href="https://code.visualstudio.com/docs/csharp/get-started">配置教程</a>)。</li>
|
|
|
|
|
<li>也可使用 Visual Studio(<a href="https://learn.microsoft.com/zh-cn/visualstudio/install/install-visual-studio?view=vs-2022">安装教程</a>)。</li>
|
|
|
|
|
</ol>
|
|
|
|
|
<h3 id="8-swift">8. Swift 环境<a class="headerlink" href="#8-swift" title="Permanent link">¶</a></h3>
|
|
|
|
|
<ol>
|
|
|
|
|
<li>下载并安装 <a href="https://www.swift.org/download/">Swift</a> 。</li>
|
|
|
|
|
<li>在 VSCode 的插件市场中搜索 <code>swift</code> ,安装 <a href="https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang">Swift for Visual Studio Code</a> 。</li>
|
|
|
|
|
</ol>
|
|
|
|
|
<h3 id="9-dart">9. Dart 环境<a class="headerlink" href="#9-dart" title="Permanent link">¶</a></h3>
|
|
|
|
|
<h3 id="8-dart">8. Dart 环境<a class="headerlink" href="#8-dart" title="Permanent link">¶</a></h3>
|
|
|
|
|
<ol>
|
|
|
|
|
<li>下载并安装 <a href="https://dart.dev/get-dart">Dart</a> 。</li>
|
|
|
|
|
<li>在 VSCode 的插件市场中搜索 <code>dart</code> ,安装 <a href="https://marketplace.visualstudio.com/items?itemName=Dart-Code.dart-code">Dart</a> 。</li>
|
|
|
|
|
</ol>
|
|
|
|
|
<h3 id="10-rust">10. Rust 环境<a class="headerlink" href="#10-rust" title="Permanent link">¶</a></h3>
|
|
|
|
|
<h3 id="9-rust">9. Rust 环境<a class="headerlink" href="#9-rust" title="Permanent link">¶</a></h3>
|
|
|
|
|
<ol>
|
|
|
|
|
<li>下载并安装 <a href="https://www.rust-lang.org/tools/install">Rust</a> 。</li>
|
|
|
|
|
<li>在 VSCode 的插件市场中搜索 <code>rust</code> ,安装 <a href="https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer">rust-analyzer</a> 。</li>
|
|
|
|
|