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. what is meant by DEFINES and INCPATH
Qt 6.11 is out! See what's new in the release blog

what is meant by DEFINES and INCPATH

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 631 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.
  • M Offline
    M Offline
    micha_eleric
    wrote on last edited by
    #1

    in https://doc.qt.io/qt-5/moc.html#writing-make-rules-for-invoking
    moc $(DEFINES) $(INCPATH) $< -o $@
    what is meant by DEFINES and INCPATH?

    jsulmJ 1 Reply Last reply
    0
    • M micha_eleric

      in https://doc.qt.io/qt-5/moc.html#writing-make-rules-for-invoking
      moc $(DEFINES) $(INCPATH) $< -o $@
      what is meant by DEFINES and INCPATH?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @micha_eleric From the link you posted:
      "Both examples assume that $(DEFINES) and $(INCPATH) expand to the define and include path options that are passed to the C++ compiler. These are required by moc to preprocess the source files."
      Define options are those defined using -D parameter (gcc), like -DSOME_DEFINE=1, those defines can be checked in code like: #ifdef SOME_DEFINE
      INCPATH simply tells moce where to look for header files.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      1
      • jsulmJ jsulm

        @micha_eleric From the link you posted:
        "Both examples assume that $(DEFINES) and $(INCPATH) expand to the define and include path options that are passed to the C++ compiler. These are required by moc to preprocess the source files."
        Define options are those defined using -D parameter (gcc), like -DSOME_DEFINE=1, those defines can be checked in code like: #ifdef SOME_DEFINE
        INCPATH simply tells moce where to look for header files.

        M Offline
        M Offline
        micha_eleric
        wrote on last edited by
        #3

        @jsulm said in what is meant by DEFINES and INCPATH:
        then I

        assume

        there is some place on qt web site, that says what DEFINEs are

        jsulmJ 1 Reply Last reply
        0
        • M micha_eleric

          @jsulm said in what is meant by DEFINES and INCPATH:
          then I

          assume

          there is some place on qt web site, that says what DEFINEs are

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @micha_eleric I don't understand: the link you posted explains what DEFINES is.
          #define itself is a C/C++ feature.
          https://www.cprogramming.com/reference/preprocessor/define.html

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          M 1 Reply Last reply
          0
          • jsulmJ jsulm

            @micha_eleric I don't understand: the link you posted explains what DEFINES is.
            #define itself is a C/C++ feature.
            https://www.cprogramming.com/reference/preprocessor/define.html

            M Offline
            M Offline
            micha_eleric
            wrote on last edited by
            #5

            @jsulm the link i posted, used DEFINES, four times.
            right now DEFINES =
            #define =
            -D parameter =
            nothing, zero, blank, not even a white space
            aint got a clue what value to put in -D parameter

            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 Extensions
            • Unsolved