[lazarus] Thought for multi-platform

Baeseman, Cliff Cliff.Baeseman at greenheck.com
Thu Jul 1 14:17:45 EDT 1999


I do not think you can nest them like that... Not sure either maybe someone
can give some insight...

Cliff

-----Original Message-----
From: Shane Miller [mailto:SMiller1 at stvgb.org]
Sent: Thursday, July 01, 1999 1:04 PM
To: lazarus at miraclec.com
Subject: Re: [lazarus] Thought for multi-platform


Here's some more info on what I am thinking.  Take a look at the following
code and you'll get a better idea of my thoughts.


unit interfaces;
 
{$mode objfpc} 

interface
{$ifdef read_interface}

{$ifdef GTK}

uses gtk,gdk,glib,mesages,gtkint;
type

TInterfaceObject = class(gtkObject)
	public
	  constructor Create;override; 
  	  destructor Destroy; override; 
	end;
Var
InterfaceObject : TInterfaceObject;

{$else}
{$ifdef QT}

uses Messages;

type
TInterfaceObject = class(QTObject)
	public
	  constructor Create;override; 
  	  destructor Destroy; override; 
	end;

Var
InterfaceObject : TInterfaceObject;

{$endif}
{$endif}


{$endif read_interface}
implementation

{$ifdef read_implementation}
constructor TInterfaceObject.Create;
	Begin
	Inherited Create;
	End;


destructor TInterfaceObject.Destroy;
	Begin
	Inherited Destroy;
	End;

{$endif read_implementation}
end.
 

problem is I can't get this to work.  It compiles but when I add
interfaces.pp to controls.pp uses clause and try to use a InterfaceObject
variable it says that InterfaceObject variable does not exist.  

Any help on this would be greatly appreciated seeing as though I've never
really used ifdef statements before.

Shane


_________________________________________________________________
     To unsubscribe: mail lazarus-request at miraclec.com with
                "unsubscribe" as the Subject
    archives at http://www.miraclec.com/list_archives/lazarus






More information about the Lazarus mailing list