开发者

Delphi 6 - Bugs disappear when I compile multiple times

开发者 https://www.devze.com 2022-12-29 07:14 出处:网络
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开发者_Go百科 I build

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开发者_Go百科 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.


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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消