Solving the Delphi 2006 web service application compilation issue
Posted: (EET/GMT+2)
If you are using Borland Developer Studio 2006 (aka Delphi 2006) and your want to quickly build a web service application in Win32 using the Web App Debugger (File/New/Other, then Delphi Projects/WebServices, SOAP Server Application), you might run into trouble if you installed your Delphi with the Indy 10 components. The reason for this trouble is that the library code that hosts your web service was written for Indy 9, and isn't fully compatible with Indy 10. So when you first try to compile your web service application, you might run into the following error message:
[Pascal Fatal Error] Project1.dpr(11): F2051 Unit SockApp was compiled with a different version of IdTCPServer.TIdTCPServer.
Although this can sound scary, this error is actually easy to fix: all you need to change is your Delphi's Library Path. This can be done by choosing Tools/Options, and then going to the Environment Options/Delphi Options/Library - Win32 tree. Here, you have the "Library path" setting which you need to edit so that it doesn't contain "$(BDS)\Lib\Indy9" but instead "$(BDS)\Lib\Indy10". That is, all you need to change is the nine to a ten. So the full, working default library path would be (all in one line, of course):
$(BDS)\lib;$(BDS)\Imports;$(BDS)\Lib\Indy9; C:\Program Files\Borland\BDS\4.0\RaveReports\Lib
For your information, the issue is already in QualityCentral, and is probably fixed in Delphi 2007 i.e. "Highlander".