如何解决 pip install 编译报错 g++: command not found(缺少 C++ 编译器)问题

摘要

本文聚焦pip install安装依赖C++扩展的Python包时出现的"g++: command not found"编译报错,该报错核心是系统缺失GNU C++编译器(g++),导致源码编译过程中无法编译C++扩展模块,最终中断安装流程。文章从报错本质、系统差异、依赖逻辑出发,拆解Linux(Debian/Ubuntu、CentOS/RHEL、Arch)、macOS、Windows三大系统下的报错根源(g++未安装、路径未配置、编译环境不完整、架构不匹配等),提供分系统的精准解决方案:Linux通过包管理器安装g++/C++编译工具链、macOS安装Xcode Command Line Tools补全clang++(等效g++)、Windows优先使用预编译包/通过MinGW/WSL适配g++;同时覆盖"安装g++后仍报错"的高频排障场景,搭配详细命令、操作步骤与验证方法,帮助开发者彻底解决该编译报错,同时给出预防策略(优先预编译包、提前配置编译环境),避免同类问题复发。

文章目录

一、报错核心认知:不是包的问题,是系统缺失C++编译器

"g++: command not found"是Python源码包安装中典型的系统级C++编译工具缺失报错,而非安装包本身的问题,新手极易误判为"包下载失败""Python环境损坏"或"网络异常",但本质逻辑是:

  • 部分Python第三方包(如NumPy、PyTorch(源码编译版)、OpenCV-python、boost-python等)包含C++扩展模块,pip安装时若系统无适配的预编译二进制包(whl),会自动下载源码包并执行"C++编译→链接→安装"流程;
  • g++是GNU C++编译器的核心命令,负责将C++源码编译为机器码,是C++扩展模块编译的必需工具;若系统未安装g++,或g++未加入系统PATH,执行编译命令时会直接抛出"g++: command not found",编译流程中断;
  • 报错高发场景:纯命令行的Linux服务器(最小化安装)、未配置Xcode Command Line Tools的macOS、原生Windows环境(无MinGW/WSL),以及所有未手动安装C++编译工具链的环境。

1.1 典型报错输出(不同系统)

场景1:Linux(Ubuntu/Debian,最小化安装)

bash 复制代码
pip install opencv-python --no-binary :all:  # 强制源码编译
Collecting opencv-python
  Downloading opencv-python-4.9.0.80.tar.gz (83.2 MB)
     |████████████████████████████████| 83.2 MB 1.1 MB/s
  Preparing metadata (setup.py) ... done
  Building wheels for collected packages: opencv-python
    Building wheel for opencv-python (setup.py) ... error
    error: subprocess-exited-with-error

    × python setup.py bdist_wheel did not run successfully.
    │ exit code: 1
    ╰─> [25 lines of output]
        running bdist_wheel
        running build
        running build_py
        ...
        running build_ext
        building 'cv2' extension
        creating build/temp.linux-x86_64-3.10
        creating build/temp.linux-x86_64-3.10/opencv
        g++ -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DUSE_OPENCV_MAIN=0 -Iopencv/include -I/usr/include/python3.10 -c opencv/modules/core/src/arithm.cpp -o build/temp.linux-x86_64-3.10/opencv/modules/core/src/arithm.o
        /bin/sh: 1: g++: not found  # 核心报错
        error: command 'g++' failed with exit status 127
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for opencv-python
  Running setup.py clean for opencv-python
Failed to build opencv-python
Installing collected packages: opencv-python
  Running setup.py install for opencv-python ... error
    error: subprocess-exited-with-error

    × Running setup.py install for opencv-python did not run successfully.
    │ exit code: 1
    ╰─> [27 lines of output]
        running install
        ...
        g++: command not found  # 核心报错
        error: command 'g++' failed with exit status 127
        [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> opencv-python

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

场景2:macOS(未装Xcode Command Line Tools)

bash 复制代码
pip install numpy --no-binary :all:  # 强制源码编译
Collecting numpy
  Downloading numpy-1.26.4.tar.gz (15.7 MB)
     |████████████████████████████████| 15.7 MB 2.0 MB/s
  Preparing metadata (pyproject.toml) ... done
  Building wheels for collected packages: numpy
    Building wheel for numpy (pyproject.toml) ... error
    error: subprocess-exited-with-error

    × Building wheel for numpy (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [30 lines of output]
        running bdist_wheel
        running build
        running build_py
        ...
        running build_ext
        building 'numpy.core._multiarray_umath' extension
        g++ -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk -I/Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/System/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c numpy/core/src/multiarray/_multiarray_umath.cpp -o build/temp.macosx-14.0-x86_64-3.11/numpy/core/src/multiarray/_multiarray_umath.o
        /bin/sh: g++: command not found  # 核心报错
        error: command 'g++' failed with exit status 127
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects

场景3:Windows(原生PowerShell,无MinGW/WSL)

bash 复制代码
pip install pyboostcpp --no-binary :all:  # 示例:依赖C++的包
Collecting pyboostcpp
  Downloading pyboostcpp-1.0.0.tar.gz (5.2 kB)
  Preparing metadata (setup.py) ... done
  Building wheels for collected packages: pyboostcpp
    Building wheel for pyboostcpp (setup.py) ... error
    error: subprocess-exited-with-error

    × python setup.py bdist_wheel did not run successfully.
    │ exit code: 1
    ╰─> [18 lines of output]
        running bdist_wheel
        running build
        running build_ext
        building 'pyboostcpp._core' extension
        g++ -mdll -O -Wall -IC:\Python311\include -IC:\Python311\Include -c src/core.cpp -o build\temp.win-amd64-cpython-311\Release\src\core.o
        'g++' 不是内部或外部命令,也不是可运行的程序  # 等效g++: command not found
        或批处理文件。
        error: command 'g++' failed with exit status 1
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyboostcpp
  Running setup.py clean for pyboostcpp
Failed to build pyboostcpp
Installing collected packages: pyboostcpp
  Running setup.py install for pyboostcpp ... error
    error: subprocess-exited-with-error

    × Running setup.py install for pyboostcpp did not run successfully.
    │ exit code: 1
    ╰─> [20 lines of output]
        running install
        ...
        g++: command not found
        error: command 'g++' failed with exit status 127
        [end of output]

1.2 新手常见误判与无效操作

面对该报错,90%的新手会执行以下无效操作,浪费大量排查时间:

  1. 反复执行pip install,认为是"临时编译失败"或"网络波动",但报错持续;
  2. 下载源码包手动执行python setup.py install,未解决g++缺失的核心问题;
  3. 重装Python/Pip,忽略系统级C++编译工具的缺失;
  4. Linux下仅安装gcc(C编译器),未安装g++(C++编译器),仍触发"g++: command not found";
  5. Windows下直接下载g++.exe文件手动放到Python目录,未配置MinGW环境,g++仍无法执行;
  6. 认为是"包版本不兼容",切换低版本包重试,却未意识到是g++工具缺失;
  7. 忽略g++路径配置,安装g++后未将其加入系统PATH,仍提示"command not found";
  8. macOS下仅安装Xcode图形界面,未安装Command Line Tools,仍无g++/clang++。

二、报错根源拆解:4大类核心诱因

该报错的底层逻辑是:pip install 包 → 无预编译whl包 → 触发C++扩展编译 → 执行g++命令 → g++缺失/路径错误 → 编译中断。核心诱因可分为4类:

2.1 系统未安装GNU C++编译器(g++)(核心原因)

g++是GNU C++编译工具链的核心组件,不同系统的默认安装状态差异极大:

  • Linux :最小化安装的Linux服务器(如Ubuntu Server、CentOS Minimal)仅预装核心系统组件,未安装g++gcc-c++等C++编译工具;桌面版Linux(如Ubuntu Desktop)通常预装,但部分精简版仍缺失;
  • macOS:原生无g++命令,替代工具是clang++(LLVM C++编译器),需安装Xcode Command Line Tools才能获取,未安装则无等效的C++编译器;
  • Windows:无原生GNU g++工具,g++仅在WSL(Windows Subsystem for Linux)、MinGW、Cygwin等兼容环境中可用,原生PowerShell/CMD无法执行g++。

2.2 g++工具未加入系统PATH

即使安装了g++,若其安装路径未加入系统环境变量PATH,终端仍无法识别g++命令:

  • Linux/macOS:g++默认安装路径为/usr/bin/g++/usr/local/bin/g++,若手动安装到非默认路径(如/opt/gcc/bin)且未配置PATH,会触发报错;
  • Windows(MinGW):g++(实际为mingw32-g++.exe)安装在C:\MinGW\bin,未将该路径加入PATH,终端无法识别。

2.3 C++编译环境不完整(连锁问题)

g++依赖完整的C++编译环境才能正常工作,仅安装g++但缺失其他组件,可能触发新报错,但核心的"g++: command not found"仅由g++缺失导致:

  • Linux:需g++(C++编译器)、make(构建工具)、libstdc++-dev(C++标准库开发包)组成完整C++编译链;
  • macOS:需Xcode Command Line Tools(包含clang++、libc++、make等);
  • Windows(MinGW):需MinGW编译器套件(包含mingw32-g++、gcc、ld等)。

2.4 系统/环境隔离问题

  • 虚拟环境隔离:Python虚拟环境仅隔离Python依赖,无法继承系统的g++工具,若系统未安装g++,虚拟环境内也无法使用;
  • 权限隔离:普通用户安装g++到用户目录(非系统路径),未配置用户级PATH,仅root/管理员可执行g++;
  • 架构不匹配:ARM64架构系统安装了x86的g++工具,无法执行;
  • 版本冲突:系统安装多个版本的g++(如系统自带gcc 5.4 + 手动安装gcc 12),未配置默认g++版本,导致编译时调用错误版本或无法找到。

三、系统化解决步骤:分系统精准适配

解决该报错的核心逻辑是"先安装g++/C++编译工具链,再优先安装预编译包,最后适配特殊系统(如Windows)",以下按系统分类提供详细方案(优先级:预编译包 > 安装g++ > 配置环境):

3.1 前置验证:确认g++是否安装/路径是否正确

先执行以下命令,锁定报错根源:

bash 复制代码
# Linux/macOS/WSL:检查g++是否安装
which g++
# 正常输出:/usr/bin/g++(说明已安装)
# 无输出:说明未安装(macOS可能输出/usr/bin/clang++,是g++的等效替代)

# Linux/macOS/WSL:检查g++版本(验证是否可用)
g++ --version
# 正常输出:g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0(说明可用)
# macOS:clang++ --version(验证clang++是否可用)

# Windows(MinGW):检查mingw32-g++是否安装
where mingw32-g++
# 正常输出:C:\MinGW\bin\mingw32-g++.exe(说明已安装)

3.2 Linux系统解决方案(覆盖90%服务器场景)

Linux不同发行版的包管理器不同,需针对性安装g++和C++编译工具链:

子场景1.1:Debian/Ubuntu/Mint

步骤1:安装g+++完整C++编译工具链(推荐)
bash 复制代码
# 更新包索引
sudo apt update

# 方案1:仅安装g++(最小化)
sudo apt install -y g++

# 方案2:安装build-essential(包含g++、gcc、make、libstdc++-dev等完整编译链,推荐)
sudo apt install -y build-essential

# 验证g++安装
which g++  # 输出:/usr/bin/g++
g++ --version  # 输出GNU g++版本
步骤2:重新安装目标Python包
bash 复制代码
# 示例:安装opencv-python
pip install opencv-python --upgrade

# 若仍报错,清除缓存后重试
pip install opencv-python --upgrade --no-cache-dir

子场景1.2:CentOS/RHEL/Fedora

步骤1:安装g++(gcc-c++)+编译工具链
bash 复制代码
# CentOS/RHEL 7/8
sudo yum install -y gcc-c++ make

# CentOS/RHEL 9/Fedora
sudo dnf install -y gcc-c++ make

# 验证g++安装(CentOS/RHEL中g++是gcc-c++的软链接)
which g++  # 输出:/usr/bin/g++
g++ --version
步骤2:重新安装目标包
bash 复制代码
pip install numpy --upgrade  # 示例:安装numpy

子场景1.3:Arch Linux/Manjaro

bash 复制代码
# 安装base-devel(包含g++、gcc、make等完整编译工具链)
sudo pacman -S --needed base-devel

# 验证g++安装
which g++
g++ --version

# 重新安装目标包
pip install pyboostcpp --upgrade

特殊场景:g++安装后仍提示"command not found"(路径问题)

bash 复制代码
# 1. 找到g++的安装路径
find /usr /usr/local -name "g++" -type f
# 示例输出:/usr/local/bin/g++

# 2. 将路径加入系统PATH(临时生效)
export PATH=/usr/local/bin:$PATH

# 3. 永久生效(Linux/macOS)
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bashrc  # bash
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.zshrc   # zsh
source ~/.bashrc  # 生效配置

# 4. 验证并重新安装包
g++ --version
pip install 目标包 --upgrade

3.3 macOS系统解决方案

macOS无原生g++,但clang++(Xcode Command Line Tools自带)是完全兼容的C++编译器,安装后会自动创建g++软链接:

步骤1:安装Xcode Command Line Tools

bash 复制代码
# 执行安装命令(系统会自动下载并安装,无需Xcode图形界面)
xcode-select --install

# 确认安装成功
xcode-select -p
# 正常输出:/Library/Developer/CommandLineTools

# 验证clang++/g++是否可用(macOS下g++是clang++的软链接)
g++ --version
# 正常输出:Apple clang version 15.0.0 (clang-1500.0.40.1)
clang++ --version  # 与g++输出一致

步骤2:(可选)通过Homebrew安装GNU g++(替代clang++)

若需原生GNU g++而非clang++,可通过Homebrew安装:

bash 复制代码
# 安装Homebrew(若未安装)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# 安装GNU g++(命名为g++-13,避免与clang++冲突)
brew install gcc

# 创建g++软链接(将GNU g++设为默认)
sudo ln -s /usr/local/bin/g++-13 /usr/bin/g++

# 验证GNU g++
g++ --version
# 正常输出:g++ (Homebrew GCC 13.2.0) 13.2.0

步骤3:重新安装目标Python包

bash 复制代码
pip install numpy --upgrade  # 示例:安装numpy

3.4 Windows系统解决方案(优先规避编译)

Windows无原生g++工具,优先使用预编译包,仅在必须源码编译时适配g++环境:

子场景1.1:推荐方案------安装预编译whl包(无需g++)

这是Windows下最便捷的方案,彻底规避C++编译和g++依赖:

  1. 打开Unofficial Windows Binaries for Python Packages(https://www.lfd.uci.edu/\~gohlke/pythonlibs/);

  2. 搜索目标包(如opencv-python、numpy、PyTorch),下载适配Python版本和系统架构(64位/32位)的whl包;

  3. 安装whl包:

    powershell 复制代码
    # 以管理员身份运行PowerShell,替换为实际文件名
    pip install opencv_python-4.9.0.80-cp311-cp311-win_amd64.whl

子场景1.2:备选方案------使用conda安装(无需g++)

Anaconda/Miniconda会自动安装预编译的包,避免源码编译:

powershell 复制代码
# 安装目标包(以numpy为例)
conda install -c conda-forge numpy

子场景1.3:进阶方案------安装MinGW适配g++(需源码编译)

若必须源码编译,需安装MinGW获取g++工具(实际为mingw32-g++.exe):

步骤1:安装MinGW
  1. 下载MinGW安装包:https://sourceforge.net/projects/mingw/;
  2. 运行安装程序,勾选"mingw32-base"(包含gcc)和"mingw32-gcc-g++"(包含g++);
  3. 安装路径默认为C:\MinGW,完成后将C:\MinGW\bin加入系统环境变量PATH;
  4. 验证:重启PowerShell,执行mingw32-g++ --version,输出版本信息说明安装成功。
步骤2:创建g++别名(可选)

MinGW的g++命令为mingw32-g++.exe,可创建g++别名方便使用:

powershell 复制代码
# 以管理员身份执行,创建软链接
New-Item -Path "C:\MinGW\bin\g++.exe" -ItemType SymbolicLink -Value "C:\MinGW\bin\mingw32-g++.exe"
步骤3:源码编译安装包
powershell 复制代码
# 强制源码编译(示例:numpy)
pip install numpy --no-binary :all: --upgrade

子场景1.4:最优方案------使用WSL(Windows Subsystem for Linux)

在WSL中使用Linux环境,完美支持g++、gcc等编译工具:

  1. 开启WSL:PowerShell(管理员)执行wsl --install,按提示安装Ubuntu等Linux发行版;
  2. 打开WSL终端,按Linux系统方案安装g++和编译工具;
  3. 在WSL中安装Python并执行pip install,无g++缺失问题。

3.5 验证解决效果

执行以下命令,确认g++可用且包安装成功:

bash 复制代码
# 1. 验证g++工具
g++ --version  # Linux/macOS/WSL
mingw32-g++ --version  # Windows MinGW

# 2. 验证包安装(以numpy为例)
python -c "import numpy; print(f'numpy版本:{numpy.__version__},安装成功!')"

四、高频排障技巧:解决"安装g++后仍报错"

4.1 安装g++后仍提示"g++: command not found"

原因:

g++安装路径未加入系统PATH,或终端未刷新环境变量。

解决方案:

bash 复制代码
# Linux/macOS:查找g++路径并配置PATH
find /usr /usr/local -name "g++" -type f
# 示例输出:/usr/local/bin/g++
export PATH=/usr/local/bin:$PATH  # 临时生效
source ~/.bashrc  # 永久生效(bash)
source ~/.zshrc   # 永久生效(zsh)

# Windows MinGW:检查PATH配置
# 1. 打开"系统属性→高级→环境变量",将C:\MinGW\bin加入系统PATH;
# 2. 重启PowerShell/CMD,执行mingw32-g++ --version验证。

4.2 Linux下g++编译时提示"error: invalid argument '-std=c++17' not allowed with 'GCC 4.8.5'"

原因:

g++版本过低,不支持包所需的C++标准(如C++17)。

解决方案:

bash 复制代码
# 1. 检查g++版本
g++ --version
# 若版本<7.0,升级g++(Ubuntu示例)
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install -y g++-11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100

# 2. 验证新版本
g++ --version  # 输出11.x版本
# 3. 重新安装包
pip install 目标包 --upgrade

4.3 macOS下g++(clang++)提示"error: no member named 'xxx' in namespace 'std'"

原因:

clang++默认C++标准版本过低,需手动指定高版本。

解决方案:

bash 复制代码
# 手动指定C++标准编译
CXXFLAGS="-std=c++17" pip install 目标包 --upgrade

4.4 虚拟环境中g++不可用

原因:

虚拟环境仅隔离Python依赖,无法继承系统的g++工具(若系统未安装,虚拟环境也无)。

解决方案:

bash 复制代码
# 1. 先在系统层面安装g++(按对应系统方案)
# 2. 激活虚拟环境后直接使用系统的g++
source venv/bin/activate  # Linux/macOS
venv\Scripts\activate     # Windows
pip install 目标包 --upgrade  # 自动调用系统的g++

4.5 权限不足导致g++编译/安装失败

原因:

g++编译后的文件需要写入系统目录,普通用户权限不足。

解决方案:

bash 复制代码
# Linux/macOS:提权执行安装
sudo pip install 目标包 --upgrade

# 或使用--user参数安装到用户目录(推荐)
pip install --user 目标包 --upgrade

4.6 Windows MinGW下g++提示"undefined reference to 'std::xxx'"

原因:

MinGW的C++标准库缺失或版本不匹配。

解决方案:

powershell 复制代码
# 1. 升级MinGW到MinGW-w64(更完整的C++标准库支持)
# 下载地址:https://sourceforge.net/projects/mingw-w64/
# 2. 配置新的MinGW路径到PATH,重启终端后重试
pip install 目标包 --upgrade

五、预防措施:避免同类编译报错复发

5.1 个人开发环境

  1. 优先使用预编译包/conda
    • Linux/macOS:pip默认优先安装whl包,避免使用--no-binary :all:参数强制源码编译;
    • Windows:优先使用gohlke的whl包或conda安装,杜绝源码编译;
  2. 提前配置C++编译环境
    • Linux:新装系统后执行sudo apt install build-essential(Debian系)/sudo yum install gcc-c++ make(RHEL系);
    • macOS:安装Xcode Command Line Tools(xcode-select --install);
    • Windows:预装WSL或MinGW,或直接使用conda管理依赖;
  3. 使用虚拟环境:虚拟环境中安装的包隔离且权限充足,避免系统级权限问题;
  4. 固定包版本 :在requirements.txt中指定带预编译whl包的版本,避免自动升级触发源码编译。

5.2 企业开发环境

  1. 搭建内网PyPI镜像:同步预编译的whl包,开发人员无需本地编译;

  2. 标准化开发环境

    • Linux:通过Docker镜像预装build-essentialg++make等编译工具;
    • Windows/macOS:通过Ansible/脚本自动配置WSL/MinGW或conda环境;
  3. 容器化部署 :在Dockerfile中提前安装所有编译工具,示例:

    dockerfile 复制代码
    # Ubuntu基础镜像
    FROM ubuntu:22.04
    
    # 安装C++编译工具链
    RUN apt update && apt install -y build-essential python3 python3-pip
    
    # 安装目标包(自动使用预编译包)
    RUN pip3 install opencv-python==4.9.0.80
  4. 避免最小化系统安装:服务器安装时选择"开发工具"组件,预装g++、gcc、make等编译工具。

六、总结

pip install的"g++: command not found"报错核心是系统缺失GNU C++编译器(g++),而非包本身或Python环境的问题。解决关键在于:

  1. 分系统补全C++编译工具 :Linux安装g++/build-essential、macOS安装Xcode Command Line Tools(clang++)、Windows优先用预编译包/conda或安装MinGW/WSL;
  2. 配置g++路径:确保g++安装路径加入系统PATH,终端能识别g++命令;
  3. 优先规避源码编译:使用预编译whl包、conda或内网镜像,减少本地编译环节;
  4. 补全编译链:Linux/macOS需同时安装g++(编译器)和libstdc+±dev(C++标准库),避免仅装其一。

通过以上方案,可彻底解决该编译报错,同时通过提前配置系统依赖、标准化开发环境,避免同类问题再次发生。

关键点回顾

  1. "g++: command not found"的核心是系统未安装C++编译器,而非包或Python环境问题;
  2. Linux优先安装build-essential(包含g+++gcc完整编译链),macOS安装Xcode Command Line Tools(clang++等效g++),Windows优先用预编译包;
  3. g++安装后需确保其路径加入系统PATH,否则仍提示"command not found";
  4. 虚拟环境无法继承系统g++工具,需先在系统层面安装g++。

【专栏地址】

更多 Python 开发高频 bug 解决方案、实战技巧,欢迎订阅我的 CSDN 专栏:🔥全栈BUG解决方案

相关推荐
Tisfy8 小时前
网站访问耗时优化 - 从数十秒到几百毫秒的“零成本”优化过程
服务器·开发语言·性能优化·php·网站·建站
济6178 小时前
嵌入式C语言(第一期)
c语言·开发语言
XiaoHu02078 小时前
Linux多线程(详细全解)
linux·运维·服务器·开发语言·c++·git
苏宸啊8 小时前
C++(二)类和对象上篇
开发语言·c++
fqbqrr8 小时前
2601C++,编译时连接两个串指针
c++
superman超哥8 小时前
双端迭代器(DoubleEndedIterator):Rust双向遍历的优雅实现
开发语言·后端·rust·双端迭代器·rust双向遍历
嵌入式进阶行者8 小时前
【算法】TLV格式解析实例:华为OD机考双机位A卷 - TLV解析 Ⅱ
数据结构·c++·算法
OC溥哥9998 小时前
Paper MinecraftV3.0重大更新(下界更新)我的世界C++2D版本隆重推出,拷贝即玩!
java·c++·算法
Jayden_Ruan8 小时前
C++蛇形方阵
开发语言·c++·算法