3

I'm trying to install the jvcl from source, but I'm getting an error in line #1267 of unit JvInterpreter;

uses
  TypInfo,
  {$IFDEF JvInterpreter_OLEAUTO}
  OleConst, ActiveX, ComObj,  

So I removed ComObj from the uses and waited for the error further down the line:

There's an error concerning EOLEError, which is part of OleAuto I added that and hoped for the best, but....

I get an error on this line #1799:

DispatchInvoke(IDispatch(Dispatch), CallDesc, PDispIDList(@DispIDs[0]), ParamTypes, Result);

So the question is: what happened to ComObj and what unit do I need for DispatchInvoke in XE2?

Johan
  • 74,508
  • 24
  • 191
  • 319

2 Answers2

2

Simply add system.win i.e. instead of comobj use system.win.comobj

Seymur
  • 21
  • 1
2

The solution is to change the uses to use a fully qualified name:

uses
  TypInfo,
  {$IFDEF JvInterpreter_OLEAUTO}
  OleConst, ActiveX, 
  {$IFDEF VER230} system.win.ComObj, {$ELSE} ComObj, {$ENDIF}  

Now it compiles without error.
See: What is the compiler version for Delphi 2010?
For a list of compiler defines.

Community
  • 1
  • 1
Johan
  • 74,508
  • 24
  • 191
  • 319
  • 4
    Alternatively, you can add "System.Win" to the project's list of available Unit Scope Names, then you do not have to change the original code at all. – Remy Lebeau Dec 12 '11 at 21:42