Visual C 的问题2010(Express)外部工具命令
我在 SuperUser 上发布了这个...但我希望 SO 的专业人士也可能对如何解决这个问题有一个好主意...
通常我们在 VS 2005 Pro 中开发,但我想尝试一下 VS 2010 。我们有基于 GNU make 工具的自定义构建工具,在创建可执行文件时会调用这些工具。
这是我每次调用外部工具时都会看到的错误:
...\gnu\make.exe): ***无法为 cygwin 堆提交内存,Win32 错误 487
需要注意的是,它仍然可以完美地工作VS2005,以及直接从命令行调用。另外,我的外部工具的设置与 VS 2005 中的设置完全相同。
是否有某些设置可能导致引发此错误?
I posted this on SuperUser...but I was hoping the pros here at SO might have a good idea about how to fix this as well....
Normally we develop in VS 2005 Pro, but I wanted to give VS 2010 a spin. We have custom build tools based off of GNU make tools that are called when creating an executable.
This is the error that I see whenever I call my external tool:
...\gnu\make.exe): *** couldn't commit memory for cygwin heap, Win32 error 487
The caveat is that it still works perfectly fine in VS2005, as well as being called straight from the command line. Also, my external tool is setup exactly the same as in VS 2005.
Is there some setting somewhere that could cause this error to be thrown?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
来自堆问题,win32错误487:
可能的解决方案可以在 更改 Cygwin 的最大内存中找到:
确保 Windows 交换文件的最大大小足够大不会有什么坏处。
总结一下:环境没有为 cygwin 可执行文件分配足够的堆空间。由于某种原因,VS2010 Express 中的问题更为严重。您需要修复环境,或者使用 cygwin 之外的其他 Linux 端口,或者使用 Microsoft 实用程序。
From problem with heap, win32 error 487 :
A possible solution might be found in Changing Cygwin's Maximum Memory:
It wouldn't hurt to ensure that the maximum size of your windows swap file is large enough.
To summerize : The environment doesn't allocate enough heap space for the cygwin executables. For some reason the problem is more acute with VS2010 Express. You need to either fix the environment, or use another Linux port than cygwin, or use Microsoft utilities.
从 cygwin 电子邮件列表 看起来其他人已经运行遇到类似的情况,即使不通过 Visual Studio 运行,他们发现解决方案通常是使用 Cygwin 的最大内存设置:
http://www.cygwin.com/cygwin-ug-net/setup-maxmem.html
(注意:值得 阅读此对话,从上面开始,了解一些有效和无效的价值观)。
其他人还报告了防病毒软件的问题(建议出于某种原因从内存中卸载),并且可能还有兼容性设置(尝试将其设置为 XP),这在某些情况下可能会影响 cygwin。请参阅:http://www.avrfreaks.net/ index.php?name=PNphpBB2&file=viewtopic&p=377066
至于 Visual Studio:您是否使用 64 位计算机,如果是,您通常是否在 64 位环境中运行该工具?
我发现,由于 Visual Studio 2010 以 32 位运行,因此从它启动的工具将作为 32 位进程启动(为了更好地说明这一点,请添加“cmd”作为工具)。我不确定为什么这在 2005 年不会受到影响(除非 2005 年让系统启动该进程(64 位),而 2010 年让系统自行处理它(32 位))。
From the cygwin email lists it looks like other people have run into similar situations, even when not running via Visual Studio, to which they've found that the solution is often to play with Cygwin's maximum memory settings:
http://www.cygwin.com/cygwin-ug-net/setup-maxmem.html
(note: it's worth reading this conversation, from above, about some values that did and didn't work).
Others have also reported issues with Anti-Virus software (recommendation is to unload from memory for some reason), and possibly also compatibility settings (try with it set to XP) which can affect cygwin in certain cases. See: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=377066
As for Visual Studio: Are you on a 64bit machine and if so are you usually running the tool in a 64bit environment?
I've found that because Visual Studio 2010 runs in 32bit, tools launched from it are launched as 32bit processes (for a good illustration of this, add "cmd" as a tool). I'm not sure why this wouldn't be affected on 2005 (unless 2005 lets the system launch the process (64bit) and 2010 handles it itself (32bit)).