On 2/14/06, Sebastian Kraft <[EMAIL PROTECTED]> wrote:
> Is it possible to compile a lazarus project with delphi without a huge amount
> of changes in the code?

You really don't need to convert from one to the other. A well
prepared project compiles with both.

> What has to be changed? Are there any tools to convert automatically?
> Or can I export an lazarus project to delphi?

Just copy the lfm files and rename them to dfm. Next try to open them
on Delphi. If it complains, make some changes in the code on the dfm.
With some conditional compiles you can easely make a project
compatible with both.

There are some hints about making a project compile with both Delphi
and Lazarus. In particular here:
http://www.box.co.za/wiki/index.php/Roadmap_Linux#Lazarus

It's not hard at all to make it compile with both, a unit that
compiles with both looks like this:

unit myunit;

{$ifdef fpc}
  {$mode delphi}
{$endif}

interface

uses
{$ifdef fpc}
  // Free Pascal only units
  LCLIntf, LResources,
{$else}
  // Delphi only or Windows only units
  Windows, Messages,
{$endif}

  // Units available for both
  Forms, SysUtils, Classes, StdCtrls, etc;

.......

implementation

{ifndef fpc}
  {$R *.dfm}
{$endif}

.....

initialization

{$ifdef fpc}
  {$I myform.lrs}
{$endif}

end.

--
Felipe Monteiro de Carvalho

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to