Recent

Author Topic: PrintersDlgs searched but Printers found  (Read 2909 times)

Neilfj

  • Newbie
  • Posts: 2
PrintersDlgs searched but Printers found
« 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.

howardpc

  • Hero Member
  • *****
  • Posts: 3545
Re: PrintersDlgs searched but Printers found
« Reply #1 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.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: PrintersDlgs searched but Printers found
« Reply #2 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...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018