gpt4 book ai didi

c - -mno-cygwin : gcc building Mercurial (Windows 2000)

转载 作者:太空宇宙 更新时间:2023-11-04 07:36:01 31 4
gpt4 key购买 nike

因为 Mercurial Installer 不能在旧的 Windows 2000 系统上运行,所以我试图从源代码构建它。它提示 C 编译器无法识别选项 -mno-cygwin。我的 gcc 版本是 4.6.1。而 MinGw 只有两个月大。

已执行以下步骤:https://www.mercurial-scm.org/wiki/BuildingOnWindows

F:\mercurial-2.0.2>python setup.py build
running build
running build_mo
warning: hgbuildmo: could not find msgfmt executable, no translations will be built

running build_py
package init file 'mercurial\__init__.py' not found (or not a regular file)
package init file 'mercurial\__init__.py' not found (or not a regular file)
running build_ext
building 'mercurial.base85' extension
f:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -If:\python27\include
-If:\python27\PC -c mercurial/base85.c -o build\temp.win32-2.7\Release\mercurial\base85.o
**cc1.exe: error: unrecognized command line option '-mno-cygwin'**
error: command 'gcc' failed with exit status 1

最佳答案

来自comment by a TDM-GCC MinGW distro developer :

As of the 4.6 series, GCC no longer accepts many unrecognized options or flags. TDM-GCC has never "supported" -mno-cygwin; now, it will complain about it. This is also true for libtool flags such as "-no-undefined".

因此,您可能不得不使用较旧的 GCC 版本,它会忽略无意义的选项,或者修复构建脚本,使它们不使用该标志(无论如何 MinGW 编译器都不需要)。

作为后续说明,从 GCC 4 开始,Cygwin 编译器似乎停止支持 -mno-cygwin:http://www.cygwin.com/ml/cygwin/2009-03/msg00802.html

所以这个选项在过去几年里或多或少都没有用。

关于c - -mno-cygwin : gcc building Mercurial (Windows 2000),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8916133/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com