Debian 下 GCC 使用中常见错误与解决
一 环境未就绪与安装问题
二 头文件与库缺失
三 依赖冲突与版本问题
四 编译命令与链接错误
五 快速排查清单与最小示例
#include <stdio.h>
int main(){ printf("Hello, World!\n"); return 0; }
编译运行:gcc hello.c -o hello && ./hello#include <iostream>
int main(){ std::cout << "Hello, C++\n"; return 0; }
编译运行:g++ hello.cpp -o hello && ./hello