views:

1830

answers:

9

I'm getting the error: wintypes.dcu not found several times a day in the Delphi 2009 IDE, after this error code completion stops working, also I can't open any unit's source code with Ctrl + Click, then I have to reopen the IDE to fix it.

Anyone has a clue about what can be causing this?

The only IDE extension I have installed is GExperts.

A: 

Why wintypes.dcu cannot be found any longer, I do not know. But the other two are obvious follow up errors: if Delphi cannot compile the code due to syntax errors (and a missing file is considered a syntax error), it stops code completion and cannot locate source code any longer using Ctrl + Click.

Ralph Rickenbach
+15  A: 

wintypes.pas and winprocs.pas has been replaced with windows.pas (since a long time). You should use Unit Aliases to replace all wintypes with windows.

Örjan Jämte
No, fix it in the source. E.g. Free Pascal/Lazarus don't support unit aliases, and D2009 code is usually not D1 compatible anyway, if only because of unicode. It is slowly time to kill this beast.
Marco van de Voort
+7  A: 

You must be still using the ancient (pre-Delphi 2) names for what is now the Windows unit. I recommend that you search and replace all your uses lists and replace WinTypes and WinProcs with Windows.

Alternatively, you can make sure you have "WinTypes=Windows" and "WinProcs=Windows" in the Unit Aliases section of your project options, but still, after all these decades, I'd move on to the 32-bit world! (16-bit being the prime limitation that meant WinTypes and WinProcs were two separate units.)

Barry Kelly
Well, it just speaks volume for Delphi backward compatibility as this must be very ancient Delphi1 code! I don't think people would even think of compiling old MS code into Visual Studio now... You guys did such a good job, Delphi developers got spoiled ;-)
François
A: 

this is a really evil problem. i believe i've had years of very poor code completion functioning because a 3rd party package mentioned these units. very, very expensive problem for me.

X-Ray
A: 

I have the same problem. In my project there is no reference to WinTypes or WinProcs. I use only Quickreport5 as a 3rd party. Any suggestion?

You might not use it explicitly, but if you get this problem, then one of your used units uses it. It's best to search all .pas files in the quickreport folder for winprocs/wintypes.
Wouter van Nifterick
+1  A: 

Do you use the Decision Cube component? So look for references on the unit MXQEDCOM.pas in your sources.

On BDS 2006, is the only reference for Wintypes and Winprocs I found.

By the way, make sure that the Unit Aliases included the values that Barry Kelly wrote.

Fabricio Araujo
+1, concrete example.
Marco van de Voort
A: 

Örjan Jämte is right. I looked for WinTypes and WinProcs, and they are not found. However, Windows.pas can be found in the following directory of Delphi 5.

Program Files\Borland\Delphi 5\Source\RTL\Win.

Thanks!

A: 

Open Project - Options, Delphi Compiler ,into Unit aliases insert:

WinTypes=Windows;WinProcs=Windows;DbiProcs=BDE;DbiTypes=BDE;DbiErrs=BDE

Ruslan
A: 

thanks 4 Advise, problem solved with this:

Open Project - Options, Delphi Compiler ,into Unit aliases insert: WinTypes=Windows;WinProcs=Windows;DbiProcs=BDE;DbiTypes=BDE;DbiErrs=BDE

soheil