Any way to make a Delphi source code compatible with elements?

Im just starting. Plan to share code units between Delphi and elements as I read is posible.

How to compatibilice that:

unit Someunit

interface

uses
  {$IFDEF OXYGENE}
  RemObjects.Elements.RTL.Delphi;
  {$ELSE}
  Classes, SyncObjs, DateUtils, SysUtils, uUDPThreads, uTools, uConsoleHelper;
  {$ENDIF}

AFAIK will never compile because the new IFDEF defines need ALL the code to be compilable for elements, and is clear Delphi until are not defined on elements. Or im wrong?

best regards.

Hi Donald,
have you tried to put the ending semi-colon outside the {$if}?

unit Someunit

interface

uses
  {$IFDEF OXYGENE}
  RemObjects.Elements.RTL.Delphi
  {$ELSE}
  Classes, SyncObjs, DateUtils, SysUtils, uUDPThreads, uTools, uConsoleHelper
  {$ENDIF}
  ;
1 Like

Patricks solution should work yes.

1 Like

Thanks!