Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Link to winspool on windows / QT5
Qt 6.12 LTS is out! See what's new in the release blog

Link to winspool on windows / QT5

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.7k Views 1 Watching
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello,

    I want to user the windows printer api. Therefore I use functions like OpenPrinter and ClosePrinter.

    On Build there are linker errors.

    printer.obj:-1: error: LNK2019: unresolved external symbol _ClosePrinter@4 referenced in function "public: void __thiscall Printer::rawprint(void)" (?rawprint@Printer@@QAEXXZ)

    I used "LIBS += -lwinspool" in the project file. But that does not help.

    I use the QT5 opensource version on windows.

    Does anybody know, what to do?

    mfg

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      @#pragma comment(lib, "Winspool.lib")@

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        in the meantime I installed qt 5.0.1. And now it works

        Maybe some variables were broken...

        1 Reply Last reply
        0

        • Login

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