需要帮助为std字符串应用MinGW修补程序,获得意想不到的结束 [英] Need help applying MinGW patches for std string, getting unexpected ends

查看:235
本文介绍了需要帮助为std字符串应用MinGW修补程序,获得意想不到的结束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要尝试应用这些补丁:

I'm trying to apply these patches:

http://tehsausage.com/mingw-to-string

所以我可以使用std字符串的东西,我应该有权访问。

So that I can use std string stuff that I should have access to anyways.

我有MinGW 4.7.2,我一开始尝试复制zip文件没有运气。

I have MinGW 4.7.2, and at first, I tried copying the zip files with no luck.

现在我试图手动应用补丁。我将补丁信息复制到一个file.patch文件中,并将其放在与我修补的文件相同的文件夹中,并运行

Now I'm trying to manually apply the patches. I copied the patch information into a file.patch, placed it in the same folder as the file I am patching, and ran

patch < file.patch

然后我得到:

 patching file stdio.h
 patch unexpectedly ends in middle of line
 Hunk #1 FAILED at 574.
 patch unexpectedly ends in middle of line
 1 out of 1 hunk FAILED -- saving rejects to file stdio.h.rej
 patch unexpectedly ends in middle of line

我确保结尾没有额外的空白。

I made sure that there is no extra white space at the end..

请帮助!

推荐答案

确定,从网站安装最新的mingw,下载补丁文件,并确保它们是干净的。

OK, installed the latest mingw from the web-site, downloaded the patch files and made sure they were clean.

我单独应用每个,他们工作没有问题。有一个警告,它是剥离的尾随CRs从文件,但它的工作没有问题。

I applied each one individually, and they worked without issue. There was a warning that it was 'Stripping the trailing CRs from the file', but it worked without issue.

每个补丁都应用在相应的目录;例如 stdio.patch 应用于 stdio.h ,其位于 / mingw / include 使用:

each patch is applied in the appropriate directory; e.g. the stdio.patch is applied to stdio.h which is in /mingw/include using:

patch </path/to/stdio.patch

同上 wchar.patch

os_defines.h 文件位于 /mingw/lib/gcc/mingw32/4.7.2/include/c ++ / mingw32 / bits ,并且该补丁也适用于那个补丁。

The os_defines.h file is found at /mingw/lib/gcc/mingw32/4.7.2/include/c++/mingw32/bits, and the patch works properly for that one as well.

我创建了一个github,补丁在 https://github.com/petesh/mingwpatches.git - 您可以克隆存储库,或从中下载各个文件。他们每个人都应该正常工作,而不只是一个关于尾随CR警告的投诉。

I created a github with the patches at https://github.com/petesh/mingwpatches.git - you can clone the repository, or download the individual files from there. Each of them should work correctly without more than a complaint about the trailing CR warning.

这篇关于需要帮助为std字符串应用MinGW修补程序,获得意想不到的结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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