Results 1 to 2 of 2

Thread: Windows OpenPrinter problem

  1. #1
    Join Date
    Dec 2007
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Windows OpenPrinter problem

    I realize that this is more of a Windows problem than a Qt problem, but I don't know how to proceed debugging this problem.

    I have a Qt program that is printing to a Dymo labeler with two sets of labels. My program does not pop up a QPrintDialog, and none of the defined enumerations for QPrinter::PaperSource will select the Left labels.

    I found an example program to print directly to the printer so that I could send the Escape code to the printer to select the label ("RawDataToPrinter") but when I compile it I get the error "undefined reference to 'OpenPrinterW@12' ". I can find the OpenPrinterW(...) in winspool.h but I've never seen a function with something like "@12" appended to it.

    Any ideas on how to proceed with debugging this - or other ways I can get some raw data to the printer - would be appreciated.

    Thanks

  2. #2
    Join Date
    Dec 2007
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Windows OpenPrinter problem

    Found the answer: I needed to tell the linker to include the winspool library (libwinspool.a). Added "LIB += -lwinspool" to the .pro file and all fixed.

Similar Threads

  1. lupdate.exe problem on Windows 7 (Qt 4.6.2)
    By glimberg in forum Installation and Deployment
    Replies: 0
    Last Post: 2nd April 2010, 21:29
  2. Replies: 19
    Last Post: 3rd April 2009, 23:17
  3. problem with Qt/ Windows--pls help
    By swamyonline in forum Installation and Deployment
    Replies: 8
    Last Post: 7th July 2008, 20:39
  4. Qt 4.3.1 Windows Svg plugin problem
    By tzioboro in forum Installation and Deployment
    Replies: 7
    Last Post: 14th September 2007, 10:37
  5. Printing problem in windows
    By joseph in forum Qt Programming
    Replies: 6
    Last Post: 12th July 2007, 08:04

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.