Version produces not compilable units in C++Builder


I’ve just installed version 9.7 on my environment and I find that I can’t compile my projects with it.
The problem appears to be a change for the TROAsyncCallback type. Before (version 9.5 was the latest I had installed) it it was generated like this:

typedef void __fastcall (__closure *TROAsyncCallback)(const _di_IROAsyncRequest aRequest);

but now it is an abstract class/interface:

__interface TROAsyncCallback  : public System::IInterface 
	virtual void __fastcall Invoke(const _di_IROAsyncRequest aRequest) = 0 ;

The problem is that the _Intf files include, for instance, this:

virtual Uroasync::_di_IROAsyncRequest __fastcall BeginLoggedIn(const TROAsyncCallback aCallback, const void* aUserData = NULL) = 0;

which can’t be compiled as now TROAsyncCallback is an abstract class, so it is not possible to create an instance.

I’m using RAD Studio 10.1 Berlin.



weird, it wasn’t declared as abstract class or interface:

  {$IFDEF TROAsyncCallback_as_reqular_method}
  TROAsyncCallback = procedure (const aRequest: IROAsyncRequest) of object;
  TROAsyncCallback = {$IFDEF DELPHI2009UP}reference to{$ENDIF} procedure (const aRequest: IROAsyncRequest);

workaround: try to uncomment {.$DEFINE TROAsyncCallback_as_reqular_method} in, rebuild packages and retest.

Edit: another workaround: manually change TROAsyncCallback with _di_TROAsyncCallback in _Intf file

Thanks, logged as bugs://82773

bugs://82773 got closed with status fixed.

Ok, I will try ASAP. I had to revert to the previous version.

I see that the bug was already fixed. What was the fix? I’m guessing changing it to _di_TROAsyncCallback?


yes, codegen now generates _Intf with _di_TROAsyncCallback for C++Builder.