Recent

Author Topic: convert Sebran delphi(4) code to lazarus  (Read 92242 times)

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: convert Sebran delphi(4) code to lazarus
« Reply #15 on: February 03, 2009, 02:34:57 pm »
Add the LCL as requirement to your application in the

now it has problem with the unit Graphics
Add the LCL as requirement to your project in the project inspector.
Quote
and here are all units used by the part generell
SysUtils, Windows, Messages, Classes, Graphics, Controls,
  Forms, Dialogs, StdCtrls, ExtCtrls, Fileread, MPlayer;
Fileread and MPlayer are not LCL or FPC units as far as I know. If you don't have the source of them, you can stop the port now.
« Last Edit: February 03, 2009, 03:39:14 pm by Vincent Snijders »

von_ks

  • Jr. Member
  • **
  • Posts: 57
Re: convert Sebran delphi(4) code to lazarus
« Reply #16 on: February 03, 2009, 03:29:53 pm »


I think I have done it.
How can I compile it ?
With the start butoom I get the same massages.
It can not find unit Graphics .

von_ks

  • Jr. Member
  • **
  • Posts: 57
Re: convert Sebran delphi(4) code to lazarus
« Reply #17 on: February 03, 2009, 04:28:26 pm »

I still need help

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: convert Sebran delphi(4) code to lazarus
« Reply #18 on: February 03, 2009, 04:36:11 pm »
Well, I don't know why it doesn't work, so I cannot help you.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8114
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: convert Sebran delphi(4) code to lazarus
« Reply #19 on: February 04, 2009, 04:41:18 am »
What about checking whether a unit named Graphics exists in the project directory? If yes, then it will conflict with Graphics unit from LCL. Try renaming it.

Messages window doesn't show everything emitted by FPC. Right click and choose 'copy all and hidden messages', then paste it somewhere (or here so we can help you) so you can examine it. Using -vt compiler option might also help.

von_ks

  • Jr. Member
  • **
  • Posts: 57
Re: convert Sebran delphi(4) code to lazarus
« Reply #20 on: February 04, 2009, 11:05:54 am »

tanx

the problem is not solved.
I am still trying to understand lazarus and how it works.
And I can say it is not easy. And I have so many questions.
I found something yesterdy about to rename of graphics in the documentation. so I have to check it too.

Kawous

von_ks

  • Jr. Member
  • **
  • Posts: 57
Re: convert Sebran delphi(4) code to lazarus
« Reply #21 on: February 05, 2009, 12:58:03 pm »
Hi

that is the messages made by compiler now.
Could  you tell me please what can I do now ?

Hint: Start of reading config file D:\lazarus\fpc\2.2.2\bin\i386-win32\fpc.cfg
Hint: End of reading config file D:\lazarus\fpc\2.2.2\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 2.2.2 [2008/10/05] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Win32 for i386
Compiling package01.pas
Compiling D:\lazarus\lcl\xmlpropstorage.pas
Compiling D:\lazarus\lcl\fileutil.pas
Compiling D:\lazarus\lcl\lclstrconsts.pas
Writing Resource String Table file: lclstrconsts.rst
Compiling D:\lazarus\lcl\masks.pas
Compiling D:\lazarus\lcl\lclproc.pas
Compiling D:\lazarus\lcl\fpcadds.pas
Compiling D:\lazarus\lcl\avglvltree.pas
D:\lazarus\lcl\avglvltree.pas(1182,16) Hint: Local variable "List" does not seem to be initialized
Compiling D:\lazarus\lcl\fileutil.pas
D:\lazarus\lcl\fileutil.pas(237,2) Fatal: Can't open include file "fileutil.inc"


Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: convert Sebran delphi(4) code to lazarus
« Reply #22 on: February 05, 2009, 01:32:29 pm »
You just have messed up your Lazarus installation by adding LCL source paths to the unit paths.

The best way to undo is to re-install Lazarus in a new directory.

Why did you add the LCL source paths? That should not be necessary, if you really added the LCL as dependency to your project. If you wish to recompile the LCL, for example because you have installed a new fpc compiler, use Tools -> Configure Build Lazarus.

von_ks

  • Jr. Member
  • **
  • Posts: 57
Re: convert Sebran delphi(4) code to lazarus
« Reply #23 on: February 05, 2009, 02:46:08 pm »

Hi Vincent

Problem with finding fpc.
please look to the attachment. zip file.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: convert Sebran delphi(4) code to lazarus
« Reply #24 on: February 05, 2009, 02:55:29 pm »
Does the file c:\lazarus\fpc\2.2.2\bin\i386-win32\fpc.exe exist? Or did you accidentially delete it? The file is installed by a lazarus installer with fpc 2.2.2. If you changed fpc versions, then you need to change the path to the compiler in the environment options.

I saw you correctly added the LCL as requirement to your project.

The compilation error you got, were while compiling the package. So add the LCL as requirement to your package too.

von_ks

  • Jr. Member
  • **
  • Posts: 57
Re: convert Sebran delphi(4) code to lazarus
« Reply #25 on: February 05, 2009, 03:10:41 pm »


I have first deinstalled the lazarus and reinstalled it in a new directory as you told in lazarusA.
should I install it again in directory lazarus ?
And when I try to add LCL to package I have only the choice to add files and I can add LCL's just as files. Is that correct ?
How can I else add LCL to packege ?
regarding to my experince and regarding to document the .pas file should be enterd  after LCL's is that correct ?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: convert Sebran delphi(4) code to lazarus
« Reply #26 on: February 05, 2009, 03:53:50 pm »


I have first deinstalled the lazarus and reinstalled it in a new directory as you told in lazarusA.
should I install it again in directory lazarus ?
Or adapt the paths in the environment options to the new lazarus directory.

Quote
And when I try to add LCL to package I have only the choice to add files and I can add LCL's just as files. Is that correct ?
No. In the package editor, click on the add button and choose for the requirements tab. Choose the LCL package.

von_ks

  • Jr. Member
  • **
  • Posts: 57
Re: convert Sebran delphi(4) code to lazarus
« Reply #27 on: February 05, 2009, 04:47:09 pm »

Hi

that is the result

Hint: Start of reading config file D:\lazarus\fpc\2.2.2\bin\i386-win32\fpc.cfg
Hint: End of reading config file D:\lazarus\fpc\2.2.2\bin\i386-win32\fpc.cfg
Free Pascal Compiler version 2.2.2 [2008/10/05] for i386
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Win32 for i386
Compiling package01.pas
Compiling .\sebran\Delphi4\FILEREAD.PAS
PPU Loading D:\lazarus\lcl\units\i386-win32\fileutil.ppu
Recompiling FileUtil, checksum changed for LCLStrConsts
D:\Temp\sebran\Delphi4\FILEREAD.PAS(1,1) Fatal: Can't find unit FileUtil used by LResources

and my configuration can you see in attached zip file.


Leledumbo

  • Hero Member
  • *****
  • Posts: 8114
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: convert Sebran delphi(4) code to lazarus
« Reply #28 on: February 06, 2009, 04:45:39 am »
Another unit conflict? Search all units (.o, .ppu, libxxx.a if any) with same name and make sure they don't conflict with LCL. If you're sure everything is alright, try rebuilding LCL.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: convert Sebran delphi(4) code to lazarus
« Reply #29 on: February 06, 2009, 06:47:04 am »
More likely, there are still some LCL ppu is the component's dirs and subdirs.
Remove all the .ppus from the component's directory and subdirectories.