MinGW“制造"开始很慢 [英] MinGW "make" starts very slowly

查看:88
本文介绍了MinGW“制造"开始很慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

经过一番痛苦和磨难,我设法安装了MinGW所需的一切,以便它们可以在非网络的计算机上工作.

After some pain and suffering, i managed to install everything necessary for MinGW to work on a computer not on the network.

它很好地工作了几天,但是现在我遇到了很长的延迟,在我发出"make"命令来构建项目之后,一切都开始发生.

It worked nicely for a couple days, but now I'm experiencing very long delays before anything starts to happen after i give the "make" command to build my project.

我尝试按照此处的建议禁用网络:为什么MinGW非常慢? 但这没有帮助.

I tried disabling the network, as suggested here: Why is MinGW very slow? But it didn't help.

请注意,并不是真正的编译/链接进度缓慢,但是这些进程的启动似乎要花很长时间. 5-10分钟.除非我刚刚做,否则它将在10到30秒内开始.

Note that it's not the actual compilation / linking progress that is slow, but the startup of those processes seems to take forever. 5-10 minutes. Except if i just did it, then it starts in 10-30 seconds.

我知道,过去将这些磁带装载到Commodore上需要花费更长的时间,但是多年来,我变得不耐烦了.

I know, it used to take a lot longer to load those tapes on Commodore, but over the years I have grown impatient.

有什么想法吗?

推荐答案

尝试执行make -r(没有隐式规则).对我来说,单个cpp文件的时间差是30秒到几分之一秒之间.

Try doing make -r (without implicit rules). For me it was a difference between 30 seconds and fraction of a second for single cpp file.

说明:

我很久以前就遇到了MinGW遇到的相同问题.我已经使用make -d进行了调查.显然,make为每个依赖关系文件使用了大量隐式规则-如果我的文件在de make检查shared_ptr.hpp(o | c | cc | v | f | r | ..以及其他数十种组合).当然这些文件不存在.看起来在Windows平台上检查文件mod时间/是否存在(当它实际上不存在时)比在Linux上要慢得多(因为与Linux一起使用,如果没有-r开关,我看不出任何区别).

I've had the same problem MinGW make long ago. I've used make -d to investigate. It was then obvious that make uses a gazillion of implicit rules for every dependency file - if my file had dep on shared_ptr.hpp then make checked for shared_ptr.hpp(o|c|cc|v|f|r|.. and dozens other combinations). Of course those files didn't exist. It looks like checking for file mod time/existence (when it doesn't really exist) on Windows platform is a lot slower than on Linux (becouse with Linux i didn't see any difference with/without -r switch).

这篇关于MinGW“制造"开始很慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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