Delphi 6 - 当我多次编译时错误消失
在过去的几个月里,我的 Delphi 安装一直在走下坡路。看起来,当我构建一个版本时,它经常会出现奇怪的错误,如果我构建,然后编译,然后构建,编译等,这些错误就会得到解决。
我已经与另一位开发人员交谈过,他认为这是一个编译器错误。随着时间的推移,这种性能下降的情况在我们的其他计算机上也发生过。
堆栈溢出认为可能是什么问题。
My Delphi installation has been going downhill for the past few months. It seems though that every so often when I build a release it has strange errors in it which are resolved if I build, then compile, then build, compile, etc.
I've talked to another developer who thinks that this is a compiler error. This sort of degrading performance over time has happened on other computers to us too.
What does stack overflow think could be the problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我见过最多的情况是相同单元/dcus 的多个版本存在于不同的文件夹/路径中,并且根据几乎微不足道的变化,编译器/链接器使用不同的路径并选择不同版本的单元来构建 exe .
我会进行一次大规模的 Spring 清理,检查 lib/搜索路径,删除所有 dcus 并确保任何单元都没有重复版本。
而且,一致认为,重新安装 Delphi 可以帮助以干净的状态开始。
What I've seen most is a case where multiple versions of the same units/dcus exist in different folders/paths, and depending on almost insignificant variations the compiler/linker uses a different path and picks different versions of the units to build the exe.
I would make a huge Spring clean-up, scrutinize the lib/search paths, remove all dcus and make sure there is no duplicate versions of any unit.
And, agreed, reinstalling Delphi could help start with a clean state.
我同意 @François 关于 DCU 的观点,但也想指出一个观察结果:有时,先构建的内容比正在构建的内容更重要。即,如果您有多个包含源代码的项目,这些项目会导致在公共目录中创建各种 .dcu/bpl 文件,但您所关心的项目没有明确要求重建它们,那么您就是最终会得到那里的一切。如果您在构建之前清除了 dcus/dcps,然后发现您的项目未构建,那么您在某处缺少 use/requires 子句。每个项目都应该能够在“干净的石板”上构建,而不是依赖于剩余的二进制文件。
I agree with @François about the DCUs, but also want to point out an observation: sometimes it matters what was built prior to what you're building. i.e. if you have several projects that contain source code that results in various .dcu/bpl files being created in a common directory, but the project that you're concerned with doesn't explicitly call for them to be rebuilt, then you're going to end up with whatever is there. If you clear the dcus/dcps prior to building, and then find that your project doesn't build, then you are missing a uses/requires clause somewhere. Every project shoudl be able to build on a "clean slate", and not rely on leftover binaries.
这没什么可说的,但这听起来像是一个典型的“位腐烂”案例。在设计不良的操作系统下,太多的事物以太多的方式交互太长时间,导致奇怪的数据损坏形式。
我要做的第一件事是卸载 Delphi 并重新安装。如果这不起作用,请尝试重新安装 Windows。 (如果它已经存在足够长的时间而导致这种情况发生,那么您可能需要重新安装操作系统。)如果这不起作用,请联系 Embarcadero 技术支持。
That's not much to go on, but it sounds like a classic case of "bit rot". Too many things interacting in too many ways for too much time under a poorly-designed OS, leading to strange forms of data corruption.
First thing I'd do is uninstall Delphi and reinstall. If that doesn't work, try reinstalling Windows. (If it's been around long enough for this to be happening, you're probably due for an OS reinstall anyway.) And if that doesn't work, contact Embarcadero tech support.