我在C:\MinGW目录中安装MinGW编译器套件,并设置PATH环境。我不知道在任何项目中的用法,我想用GCC编译器编译我的程序,但我不知道步骤。我怎么用GCC编译我的程序?
发布于 2010-12-20 21:02:21
只需使用以下命令:
发布于 2011-10-12 18:51:56
我通常从SourceForge using the automated installation安装MinGW。
选择"mingw-get“。然后,一定要安装GCC的C++编译器功能。要检查安装是否正常,请在命令行中输入"gcc -v“。你应该看一下GCC的版本。
如果它不工作,请检查您的系统路径。"C:\MinGW\bin“应正确配置。
要以简单快速的方式开发您的应用程序,您可以下载Eclipse-CDT for Windows。
Eclipse不需要任何安装。将其解压缩到您想要的目录中,然后就可以工作了。如果它不工作,您可能需要预先安装一个Java虚拟机。
Eclipse会自动检测您的MinGW安装,因此您不需要做任何事情。
创建一个新的C项目(选择测试项目"Hello World“或自己编写),然后编译并运行。
发布于 2016-04-21 14:41:37
1. Download MinGW
2. Check mingw folder exist in C drive. If it exist go to step 3.
3. set environment variable in environment name "c:\mingw\bin" and press OK.
4. Go to command Prompt type mingw-get install gcc
5. after the installation of gcc, type powershell in command prompt.
6. from powershell Browse to the folder where your source files are residing.
7. type "gcc yourprogram.c", it will compile the source code
8. type "./a.exe" you will get your output on console. Enjoyhttps://stackoverflow.com/questions/4489702
复制相似问题