Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error: undefined reference to `_imp___ZN8QPrinterC1ENS_11PrinterModeE'
QtWS25 Last Chance

Error: undefined reference to `_imp___ZN8QPrinterC1ENS_11PrinterModeE'

Scheduled Pinned Locked Moved Solved General and Desktop
qprinterqprintdialog
2 Posts 2 Posters 6.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Olivier Ronat
    wrote on last edited by
    #1

    When using this code :

    // Create a printer
    QPrinter printer;
    
    // Create a Dialog
    QPrintDialog dialog(&printer, this);
    dialog.setWindowTitle(tr("Print Document"));
    

    if (dialog.exec() == QDialog::Accepted) {

     }
    

    I've got errors when compiling

    Error: undefined reference to `_imp___ZN8QPrinterC1ENS_11PrinterModeE'

    Error: undefined reference to `_imp___ZN12QPrintDialogC1EP8QPrinterP7QWidget'

    What must I do?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      Do you have
      QT += printsupport

      in the .pro file ?

      Ps. If you add it. remember to run qmake.

      1 Reply Last reply
      3

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved