让 mingw-get 正确安装 - 缺少 mingw/msys 路径以及更多!

2022-01-23 00:00:00 g++ windows-xp mingw c++ msys

我正在运行 Windows XP.

I'm running windows XP.

我一直在关注本教程,所以下载了mingw-get-inst 这里.

I have been following this tutorial and so downloading mingw-get-inst here.

我已经这样做了几次,最后一次我检查 boes 以安装所有东西,包括但不限于 gcc、g++、MSYS 和 MinGW 编译套件.我也告诉它做一个程序菜单快捷方式.

I've done this a couple times and the last time I checked boes to install EVERYTHING including, but not limited to, gcc, g++, MSYS and the MinGW Compiling Suite. I told it to make a program menu shortcut, too.

我相信我已将 MinGW/bin 正确添加到环境设置的路径.

I believe I have correctly added MinGW/bin to the Environment Settings' Path.

所以我现在有了 MSYS shell 的快捷方式.到C:MinGWmsys1.0msys.bat,但是整个msys目录都不存在!

So I have the shortcut to the MSYS shell now. It goes to C:MinGWmsys1.0msys.bat, but the whole msys directory does not exist!

据我所知,已经下载了大量包"(mingw-get show"带来了很多!),但似乎没有一个安装正确.

There are tons of "packages" have been downloaded as far as I can tell ("mingw-get show" brings up a lot!), but it doesn't seem like any of it installed correctly.

另外,我是否应该能够从 cmd.exe 或仅从 MSYS shell 使用g++ foo.cpp -o foo.exe"之类的命令?因为我无法使用cmd.exe.

Also, should I be able to use commands like "g++ foo.cpp -o foo.exe" from cmd.exe or only from the MSYS shell? Because I was unable to use cmd.exe.

请帮忙!

推荐答案

MSYS 和 MinGW 的安装过程是一场噩梦,并且多年来变得更糟.如果你只想要编译器套件(没有 UNIX 工具,如 sed、grep),那么我建议你去 暮龙媒体 和从那里下载 GCC.如果您还想要所有工具,包括 Bash shell,我发现获得它们的最简单方法是安装 Git for Windows (无论如何您都可能想要),其中包括所有内容.如果您想要一个与 GCC 配合良好的 C++ IDE,请查看 Code::Blocks.

The MSYS and MinGW installation procedure is a nightmare, and has got worse over the years. If you just want the compiler suite (no UNIX tools like sed, grep), then I suggest you go to Twilight Dragon Media and download GCC from there. If you also want all the tools, including the Bash shell, the easiest way I've found to get them is to install Git for Windows (which you may want anyway), which includes them all. And if you want a C++ IDE that works well with GCC, take a look at Code::Blocks.

相关文章