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. ZXing compiling error
Qt 6.11 is out! See what's new in the release blog

ZXing compiling error

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 311 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.
  • A Offline
    A Offline
    AlperenCvs
    wrote last edited by
    #1

    I'm going to create a barcode reader program with ZXing.

    I've managed to retrieve the repository using FetchContent.

    However, whenever I compile, I get this error:

    :-1: error: ld.lld: error: undefined symbol: ZXingQt::BarcodeReader::metaObject() const

    There's more to this...

    The cmake is like this:

    target_link_libraries(appZXing
    PRIVATE Qt6::Quick
    ZXing::ZXing
    )

    1 Reply Last reply
    0
    • Nils SjobergN Offline
      Nils SjobergN Offline
      Nils Sjoberg
      wrote last edited by
      #2
      target_link_libraries(appZXing
          PRIVATE
          Qt6::Quick
          ZXing::ZXing
          ZXing::ZXingQt
      )
      

      Do it like this

      "What's up, Doc?"

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AlperenCvs
        wrote last edited by
        #3

        I solved the problem by adding #include "moc_ZXingQt.cpp" to the end of the cpp file, but thanks anyway :)

        1 Reply Last reply
        1
        • A AlperenCvs has marked this topic as solved

        • Login

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