tags:

views:

728

answers:

3

Hello.

I have just installed Delphi 2010 and got some troubles with idHTTP component. If I drop it on form and try to compile, Delphi says that:

[DCC Error] IdCookieManager.pas(118): E2010 Incompatible types: 'TIdCookieList' and 'TIdCookieDomainList'

[DCC Error] IdCookieManager.pas(172): E2003 Undeclared identifier: 'IsValidCookie'

[DCC Error] IdCookieManager.pas(236): E2010 Incompatible types: 'TIdCookieList' and 'TIdCookieDomainList'

[DCC Fatal Error] Unit4.pas(7): F2063 Could not compile used unit 'IdCookieManager.pas'

Where is the problem? I just don't get it. =(

PS It's Embarcadero® Delphi® 2010 Version 14.0.3593.25826

+2  A: 

The version of Indy that came with D2010 was incomplete, though this may have been fixed in a subsequent update. If not, or if you are using an unpatched Delphi, this is only one of a number of problems you may encounter, depending on which parts of Indy you use.

I suggest you ensure your Delphi is fully updated and possibly also consider getting the latest Indy 10 from the AtoZed SVN server.

Deltics
Agreed, it's a good idea to get the latest version of Indy. However, his Delphi is fully updated, and dropping a TIdHTTP component (the version that ships with Delphi 2010) on a form in a new project works like a charm for me.
Bruce McGee
Upgrading to a newer Indy 10 SVN snapshot is the way to go. There have been several bug fixes made since 2010's release, including major updates to the Cookie support classes.
Remy Lebeau - TeamB
+1  A: 

IIRC, when you install D2010 you choose whether to install Indy 9 or 10. This appears to me to be a case of your choosing to install Indy 9, but the library paths in the IDE are seeing the Indy10 source (or vice versa) while it's seeing the .DCUs for the other version in the Lib folder.

The easiest fix would be to reinstall Delphi, and make sure you choose Indy 10 so that the source and compiled .DCU files match. The other option is to uninstall Indy completely and then reinstall it from the source that @Deltics suggested above.

Ken White
There is no option to install Indy 9 in D2010. Indy 9 is not compatible with 2010, or even 2009 for that matter. It was included in the 2009 installer by accident.
Remy Lebeau - TeamB
Remy, I must have been thinking about D2009 having both versions. Thanks for the correction. Still looks like the compiler is finding both versions and getting confused to me, though; that's the usual cause for the "incompatible types" messages the OP is seeing when it happens for things like "TIDCookieList" and "TIDCookieDomainList".
Ken White
A: 

Doesn't Delphi 2010 ship with DCUs for Indy?

Why is dropping TIdHTTP on a form trying to compile the Indy sources? Did you add the path to the Indy source files to the Library Path?

My latest Delphi is 2009, but the folder with DCUs, $(BDS)\Lib\Indy10, is near the top of the Library Path

jasonpenny