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

delphi

(DonaldShimoda) #1

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.


(Patrick Lanz) #2

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}
  ;

(Carlo Kok) #3

Patricks solution should work yes.


(DonaldShimoda) #4

Thanks!