Recent

Author Topic: .dfm troubles ?  (Read 6672 times)

TonS

  • New member
  • *
  • Posts: 5
.dfm troubles ?
« on: March 22, 2007, 02:43:20 pm »
Hello!
I have made some applications with Delphi. I try to convert them to Lazarus.
The lazarus version : 9.20 on Windows XP.
When I compile I get the message :
".. can not determine type file .....\xyz.DFM; use the -l option"
What exactly I have to do?

Bart

  • Hero Member
  • *****
  • Posts: 4096
    • Bart en Mariska's Webstek
RE: .dfm troubles ?
« Reply #1 on: March 22, 2007, 04:02:51 pm »
Quote from: Wiki
The first thing to do when converting a Delphi project.

Having opened Lazarus, you should go to to Tools and then Convert Delphi Project to Lazarus Project. This won't do everything for you, but nonetheless will take you a good deal of the way.


Bart

TonS

  • New member
  • *
  • Posts: 5
unit interfaces...
« Reply #2 on: March 23, 2007, 01:33:19 pm »
Bart, I have done wat you said.
It's going a little better now.

question 1: Do I add the unit "interfaces" (in the uses clause) in all the Forms and also in all the units of the project?

question 2 : Does the unit "interfaces" the same as the unit "LCLintf"?

question 3 : Where can I set the name of the form which has to be the first form you see when the application starts?

greetings, Ton Smal, The Netherlands.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
Re: unit interfaces...
« Reply #3 on: March 23, 2007, 03:13:54 pm »
Quote from: "TonS"
question 1: Do I add the unit "interfaces" (in the uses clause) in all the Forms and also in all the units of the project?


Only on the project file, and make sure it´s the first unit.

Quote
question 2 : Does the unit "interfaces" the same as the unit "LCLintf"?


No. LCLIntf is a unit with reimplementations of some commonly used winapi functions. This is mostly to help porting delphi software, and also to add extended functionality. Don´t expect it to work 100% like on windows.

TonS

  • New member
  • *
  • Posts: 5
trying .....
« Reply #4 on: March 24, 2007, 12:50:48 pm »
- I have convert (via Tools -> Convert) my Delhpi project to Lazarus project.
- I have added the unit "interfaces" as the first unit in the projectfile (.lpr)
Result :
No compiling errors, no linking errors BUT .... no application!

I get the message (after compiling and linking) "Project xyz has been built".
But then ... : "Project raised exception class "EReadError".
In the Lresources unit I see in the function InitComponent(...) the errorline : "Reader.ReadRootComponent(Instance)"

I hope you can help me.
I have an additional question : Where can I set the name of the form which has to be the first form you see when the application starts?  (In Delphi : Project -> Project options -> tab Forms -> "main Form :...")

greetings, Ton

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2514
RE: trying .....
« Reply #5 on: March 26, 2007, 11:24:30 am »
IIRC, it is the first of the visible forms.

also, I wonder why you had to add the interfaces unit manually. AFAIK it should be added automatically.

You could try to open the forms in the IDE, to see if they can be loaded by Lazarus at all.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

TonS

  • New member
  • *
  • Posts: 5
continuing story ....
« Reply #6 on: March 26, 2007, 07:20:10 pm »
Marc, sorry I don't no what you mean with "IIRC" and with "AFAIK".

The Forms can be loaded by Lazarus, I have done that with all the Forms.

greetings, Ton

Zorba

  • Jr. Member
  • **
  • Posts: 77
RE: continuing story ....
« Reply #7 on: March 26, 2007, 07:57:59 pm »
IIRC: If I Recall Correctly
AFAIK: As Far As I Know
:)

 

TinyPortal © 2005-2018