[lazarus] Thought for multi-platform
Shane Miller
SMiller1 at stvgb.org
Thu Jul 1 14:04:32 EDT 1999
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
More information about the Lazarus
mailing list