Linux 安装编译环境

7 篇文章 0 订阅
2 篇文章 0 订阅

Debian 系统(如 Ubuntu 等)

sudo apt−get install build−essential

支持 RPM 的系统(如 Fedora、Redhat 和 CentOS 等)

sudo yum groupinstall development−tools

Mac OS X

通过 App Store 安装 Xcode 即可。

Windows

建议使用 VirtualBox 安装 Linux,如 Ubuntu 和 CentOS。
其他选项:Cygwin 或者 MinGW,比较复杂。

检验

  • 打开终端(Terminal)
  • 执行 cc --version
  • 看结果
    • CentOS 7
      $ cc --version
      cc (Ubuntu 4.8.2-19ubuntu1) 4.8.2
      Copyright (C) 2013 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.  There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
      
    • CentOS 7
      $ cc --version
      cc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
      Copyright (C) 2015 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.  There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
      
    • Mac OS X
      $ cc --version
      Apple LLVM version 10.0.0 (clang-1000.11.45.5)
      Target: x86_64-apple-darwin18.2.0
      Thread model: posix
      InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
      

From 《Learn C the Hard Way》Exercise 0

  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值