Recent

Author Topic: Converion from delphi to Lazarus  (Read 9230 times)

vini7

  • New Member
  • *
  • Posts: 13
Converion from delphi to Lazarus
« on: October 31, 2007, 03:00:06 pm »
Hi

I am getting following error while converting (porting) delphi code to Lazarus code.

1)
error: identifier not found "GetTickCount"
error:Identifier not found"TSpinButton"

How to resolve these errors???

Please help..javascript:emoticon(':cry:')

Regards
Vini7

antonio

  • Hero Member
  • *****
  • Posts: 605
RE: Converion from delphi to Lazarus
« Reply #1 on: October 31, 2007, 04:09:20 pm »
GetTickCount is a Windows API call. You can use Time functions instead.

TSpinButton AFAIK is not a Lazarus component.

windy

  • Full Member
  • ***
  • Posts: 186
RE: Converion from delphi to Lazarus
« Reply #2 on: October 31, 2007, 07:16:45 pm »
delete the tspin reference in the uses clause...lazarus does have a spin control...but its named differently from the delphi one (from memory when I had the same problem)

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Converion from delphi to Lazarus
« Reply #3 on: October 31, 2007, 08:38:06 pm »
Quote from: "vini7"
Hi

I am getting following error while converting (porting) delphi code to Lazarus code.

1)
error: identifier not found "GetTickCount"
error:Identifier not found"TSpinButton"

How to resolve these errors???

Please help..javascript:emoticon(':cry:')

Regards
Vini7


Include the Lazarus LclIntf unit - it includes GetTickCount.

The Lazarus LCL includes a control called TSpinEdit, but no component with the same name as Delphi's TSpinButton. If you want to be able to compile your code with both Delphi and Lazarus, consider replacing the TSpinButton control with the Orpheus TOvcSpinner control, which is available for both Delphi and Lazarus:

http://wiki.lazarus.freepascal.org/OrphPort

Thanks.

-Phil

windy

  • Full Member
  • ***
  • Posts: 186
RE: Re: Converion from delphi to Lazarus
« Reply #4 on: November 01, 2007, 12:02:23 am »
ops, I thought he had meant tspinedit  (under samples in delphi)
my fault
LclIntf unit  I added myself after seeing that mentioned elsewhere...good call there too!
I think I will go back under where I came from ,LOL

vini7

  • New Member
  • *
  • Posts: 13
RE: Re: Converion from delphi to Lazarus
« Reply #5 on: November 01, 2007, 10:31:43 am »
Thanks to all

Phil, as u suggested I downloaded and install Orpheus.And added TOvcSpinner control.so removed error of undefined  identifier TSpinButton.

How to include Include the Lazarus LclIntf unit .Please chk syntax what I have done:
uses
 LCLIntf,

Is it correct way of including unit??? As I am not getting error..but just want to confirm it.

Thanks & Regards
Vini7

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2584
RE: Re: Converion from delphi to Lazarus
« Reply #6 on: November 01, 2007, 11:10:16 am »
yes, that correct
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

vini7

  • New Member
  • *
  • Posts: 13
RE: Re: Converion from delphi to Lazarus
« Reply #7 on: November 01, 2007, 01:11:56 pm »
thanks  and hi to all

can u please see my next queries in PORTED FROM DELPHI/KYLIX session in forum.

Please chk it out that one also...

Regards
vini7

 

TinyPortal © 2005-2018