如何编译一个C程序? [英] How to compile a C program?

查看:90
本文介绍了如何编译一个C程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很久没做C了。我想编译此程序,但是我有不知道如何进行。看起来makefile经常引用GCC,但我从未使用过GCC。

I haven't done C in a long time. I'd like to compile this program, but I have no idea how to proceed. It seems like the makefile refers to GCC a lot and I've never used GCC.

我只想要一个可在Windows上运行的可执行文件。

I just want an executable that will run on windows.

推荐答案

您可能需要安装cygwin或mingw,它们是Windows的类似UNIX的环境。

You may need to install either cygwin or mingw, which are UNIX-like environments for Windows.

  • http://www.mingw.org/
  • http://www.cygwin.com/

在下载/安装cygwin或mingw时,您可以选择下载和安装一些可选功能。您将需要以下内容:

When downloading/installing either cygwin or mingw, you will have the option of downloading and installing some optional features; you will need the following:


  • gcc(首先尝试版本2.x,而不是3.x)

  • binutils

  • GNU make(或gmake)

这篇关于如何编译一个C程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆