[英]New MinGW gcc doesn't do anything
I'm trying to compile a simple helloworld
program with MinGW
on Windows and nothing happens. 我正在尝试在Windows上使用
MinGW
编译一个简单的helloworld
程序,但没有任何反应。 No output, no executable, nothing. 没有输出,没有可执行文件,没有。 I've just installed the latest MinGW with their
mingw-get-inst-20120421.exe
installer. 我刚刚用他们的
mingw-get-inst-20120421.exe
安装程序安装了最新的MinGW。 When I use an older version of MinGW that came with Code::Blocks
, I am able to compile the program. 当我使用
Code::Blocks
附带的旧版MinGW时,我能够编译该程序。 I'm out of ideas and my googling has been in vain. 我没有想法,我的谷歌搜索一直是徒劳的。 C:\\MinGW\\bin is on my path and I'm using MSYS.
C:\\ MinGW \\ bin在我的路径上,我正在使用MSYS。
Command line parameters in MSYS: MSYS中的命令行参数:
gcc helloworld.c -o helloworld
Execute the console from the Start menu, Start->MingW->MinGW Shell or from filesystem: 从“开始”菜单,“开始” - >“MingW-”>“MinGW Shell”或从文件系统执行控制台:
C:\\MinGW\\msys\\1.0\\msys.bat C:\\ MinGW的\\ MSYS \\ 1.0 \\ msys.bat
Execute gcc in this shell. 在这个shell中执行gcc。
Otherwise you will have to add the minGW/bin directory to your PATH environment variable. 否则,您必须将minGW / bin目录添加到PATH环境变量中。
Go to the directory where you have you gcc executable. 转到你有gcc可执行文件的目录。 In my case it's:
在我的情况下它是:
C:\MingW\bin
From there execute gcc: 从那里执行gcc:
gcc myFile.c
If it compiles, than something must screwed up your $PATH
如果它编译,那么必须搞砸你的
$PATH
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.