Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT_CONFIG undefined error

QT_CONFIG undefined error

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 482 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.
  • A Offline
    A Offline
    Andy117
    wrote on last edited by
    #1

    I now compile a source code using the QT_CONFIG by the cross compiler(qt4.8.5).

    #if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printdialog)
        QPrinter printer(QPrinter::HighResolution);
    

    The compile error occurred like the below error message.

    function-like macro 'QT_CONFIG' is not defined
    

    I can't find the QT_CONFIG definition in the include files of the QT4.8.5.
    Maybe above code could be created on the base of the QT5 version.

    How could I resolve this problem?

    Thanks.

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

      Hi,

      What exactly are you trying to compile ?
      Qt 4.8.5 is not a cross-compiler by the way.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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

        I have solved this problem using the example of the qt 4.8.5.
        It was the version mismatching problem.
        Thanks

        1 Reply Last reply
        0
        • A Andy117 has marked this topic as solved on

        • Login

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