Lazarus

Free Pascal => Beginners => Topic started by: Neilfj on June 07, 2014, 04:58:05 pm

Title: PrintersDlgs searched but Printers found
Post by: Neilfj on June 07, 2014, 04:58:05 pm
I note this issue discussed in 2011 but it's a show-stopper for me at the moment. I wish to convert a set of Delphi programs to Lazarus, but have come up against the above compile error. The PAS files in question don't refer to printers or contain anything identifiable as "Printers"; neither do the files in their USES section.  I have tried both on OSX and a Windows PC - completely independent data sources - and I get the same result. Most grateful for any help.
Title: Re: PrintersDlgs searched but Printers found
Post by: howardpc on June 07, 2014, 05:39:35 pm
If this arises because PrintersDlgs is specified in some uses clauses, one approach would be to comment out all places where PrintersDlgs is present (including the .dpr), and comment out the corresponding classes (TPrintDialog, TPageSetupDialog or TPrinterSetupDialog) and any places in the implementations that refer to them. You will also have to locate the offending classes in your .dfm files and remove them (tedious and error-prone, but doable if the dfms are text format).
You may then find the Delphi converter tool in Lazarus will create a compilable conversion. If so, you can go about adding back whatever print functionality you want step by step.
Title: Re: PrintersDlgs searched but Printers found
Post by: BigChimp on June 08, 2014, 10:11:55 am
AFAIR, the Delphi conversion tool in Lazarus also contains options to replace things/identifiers given a list of replacements that is user-definable.
Don't know if that can help in this case, but it might make the conversion process smoother...
TinyPortal © 2005-2018