[MinGW]_[C/C++]_[msys的使用问题]

本文介绍了解决Eclipse调用MSYS的make命令时出现错误的方法,通过使用rebase命令调整内存基地址解决问题。同时分享了如何让MSYS终端支持中文文件名显示及中文路径操作的技巧。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


问题1:

1.eclipse调用msys的make命令时,有时候会报错,重启电脑或重启eclipse都不行.命令行就不报错。

      0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x71110000, RegionSize 0x80000, State 0x10000
E:\software\msys\1.0\bin\make.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0

2.今天google解决了.挺管用的,这样就不需要在命令行下编译了。

rebase -b 0x30000000 msys-1.0.dll


原文:  

1. http://stackoverflow.com/questions/19259272/error-installing-gem-couldnt-reserve-space-for-cygwins-heap-win32-error-487

2.http://blog.youkuaiyun.com/snail_coder/article/details/9953523


stackoverflow的:

2 down vote accepted

I was facing the exact same issue and after making a lot of searches and many different tries, this is what fixed it for me:

  1. Downloaded rebase from http://www.tishler.net/jason/software/rebase/ (download the latest *.exe version) and run it.

  2. Fire up a Prompt ("Run as administrator") and go to your dev-kit folder (for instance, mine wasC:\Programs\dev_kit)

  3. While in the dev-kit folder, run devkitvars.bat to add devkit to the path.

  4. Now do a cd bin (it got me to C:\Programs\dev_kit\bin) and from there run:

    rebase -b 0x30000000 msys-1.0.dll

Try to install the gems again. Instead of seeing an error message, now you should seeBuilding native extensions. This could take a while... and it will hang for a while there.



需要注意的是这个rebase命令windows sdk也自带,所以需要下载windows sdk.

C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin

问题2:

1.msys的终端不支持显示中文文件名

编辑 /etc/profile 最后加入
alias ls="ls --color=tty --show-control-chars"


问题3:

1.msys支持中文路径的操作,比如cd进一个中文文件夹?未解决




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Peter(阿斯拉达)

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值