Forum > Windows

Problem with convert from Delphi to Lazarus

(1/3) > >>

teco:
Hi,
I have used the converter from Lazarus 3.2 to convert a Delphi Sourcecode to Lazarus.

The converter has finished, but when I try to compile I get a lot of errors.

Is there a Namespace Reference List available. The current source of the errors are the used namespaces.


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses  Winapi.Windows, Winapi.Messages,  System.SysUtils, System.StrUtils, System.DateUtils, System.IOUtils, System.Variants, System.Classes, System.Math, System.Win.Registry, System.Rtti,  Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.WinXCtrls, Vcl.CheckLst, Vcl.AppEvnts, Vcl.Clipbrd,  Windows.Foundation, Windows.System.WindowsProgramming, Windows.System.Power, Windows.System.Threading,  Windows.Devices.DeviceAndDriverInstallation, Windows.System.SystemServices, Windows.System.Shutdown, Windows.System.Recovery,  Windows.UI.WindowsAndMessaging, Vcl.Menus {, Windows.UI.Input.KeyboardAndMouse}; 
Currently is stops because of IOUtils. What can be used instead.

Thank you.

rvk:

--- Quote from: teco on April 04, 2024, 02:17:22 pm ---Currently is stops because of IOUtils. What can be used instead.

--- End quote ---
With what error?

System.IOUtils should exists.
(at least if I add System.IOUtils to my uses clause it doesn't complain)

For IOUtils you could leave the System. in front (because it does really exist).
For the others you can just strip Vcl. and System. etc.

(It would be useful if the converter did that, if it doesn't already.)

teco:
I am using Lazarus 2.2.6  64 Bit

Delphi Project converted with "Tools - Delphi Conversion  Convert Delphi Project to Lazarus Project"

Errormessages are  "Fatal: Cannot find IOUtils used by"  or "Fatal: Cannot find System.IOUtils used by"

The converter has shown only that "VCL.Forms" is not existing. I have changed this to "Forms" in the lpr file.

Complete source code attached. It is from the Delphi-Praxis Forum.

Any idea why it does not find System.IOUtils?

rvk:

--- Quote from: teco on April 04, 2024, 02:54:10 pm ---I am using Lazarus 2.2.6  64 Bit
--- End quote ---
Can't help you there. That's an old version.

I thought you said you were using Lazarus 3.2

--- Quote from: teco on April 04, 2024, 02:17:22 pm ---I have used the converter from Lazarus 3.2 to convert a Delphi Sourcecode to Lazarus.

--- End quote ---


--- Quote from: teco on April 04, 2024, 02:54:10 pm ---Any idea why it does not find System.IOUtils?

--- End quote ---
For FPC 3.2.2 (which should also be in Laz 2.2.6) it would be in fpc\packages\vcl-compat\src.

I don't have a Laz 2.2.6 installed so I can't check.

But if you used the converter from Lazarus 3.2, you should also use Lazarus 3.2 itself. Not go back with the converted project to 2.2.6.

teco:
Sorry for confusion.
First I have used Lazarus 3.2. As it failed I have tried an old installation of Lazarus 2.2.6.

The folder  fpc\packages\vcl-compat\src has only the file "system.netencoding.pp"

Is the installation broken? I have only installed the 64 bit Windows version and the cross kit for 32bit

Navigation

[0] Message Index

[#] Next page

Go to full version