如何使用MinGW的编译生成文件? [英] How to compile makefile using MinGW?

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

问题描述

我在这个新的,只是想请教如何在C语言中使用MinGW的编译器编译一个makefile.am。我一定要保存的MinGW \\ bin中的所有我的文件?因为现在我的文件在不同的目录中。

鸭preciate的帮助。


解决方案

摘自 http://www.mingw.org/wiki / FAQ

有什么品牌和之间的区别的mingw32-做什么呢?

本地(即:MSVCRT依赖)化妆的端口是缺乏一些功能,并已修改的功能,由于在Win32缺少POSIX的。此外,还存在于MSYS分布取决于MSYS运行时版本之作。这口作为化妆的目的是操作和执行过程中产生较小的头痛经营着。在此基础上,MinGW的开发/维护/打包决定这将是最好的重命名原生版本,这样无论是原生的版本和MSYS版本可能会在没有文件名冲突的同时present。

所以,寻找到C:\\ MinGW的\\ bin目录,首先要确定什么使可执行文件,已安装(或的make.exe的mingw32-的make.exe)

使用的MinGW之前,您应该添加C:\\ MinGW的\\ BIN;使用在 http://www.mingw.org/wiki/Getting_Started/ <提到的说明PATH环境变量/ p>

然后cd到你的目录,其中有makefile文件,并使用的mingw32-的make.exe makefile.in 或简单地尝试的make.exe的makefile 。在。(取决于可执行文件位于C:\\ MinGW的\\ BIN)

如果你想有一个基于GUI的解决方案,安装IDE DEVCPP,然后再化妆。

I'm new at this, Just wanted to ask how to compile a makefile.am using MinGW compiler in C language. Do I have to save all my files in MinGW\bin? because right now my file are in different directory.

Appreciate the help.

解决方案

Excerpt from http://www.mingw.org/wiki/FAQ:

What's the difference between make and mingw32-make?

The "native" (i.e.: MSVCRT dependent) port of make is lacking in some functionality and has modified functionality due to the lack of POSIX on Win32. There also exists a version of make in the MSYS distribution that is dependent on the MSYS runtime. This port operates more as make was intended to operate and gives less headaches during execution. Based on this, the MinGW developers/maintainers/packagers decided it would be best to rename the native version so that both the "native" version and the MSYS version could be present at the same time without file name collision.

So,look into C:\MinGW\bin directory and first make sure what make executable, have you installed.(make.exe or mingw32-make.exe)

Before using MinGW, you should add C:\MinGW\bin; to the PATH environment variable using the instructions mentioned at http://www.mingw.org/wiki/Getting_Started/

Then cd to your directory, where you have the makefile and Try using mingw32-make.exe makefile.in or simply make.exe makefile.in(depending on executables in C:\MinGW\bin).

If you want a GUI based solution, install DevCPP IDE and then re-make.

这篇关于如何使用MinGW的编译生成文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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