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. Setting DEFINE in .pro file not working
Forum Update on Monday, May 27th 2025

Setting DEFINE in .pro file not working

Scheduled Pinned Locked Moved Unsolved General and Desktop
creatorqmake
4 Posts 3 Posters 2.4k 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.
  • J Offline
    J Offline
    jwomble
    wrote on 27 Apr 2016, 18:33 last edited by jwomble
    #1

    I am trying to add a preprossesor define in my .pro file like this:
    DEFINES += SOMEDEFINE

    This isn't working for me (the definition is not being added to the make.debug or make.release files). Is there some trick to this that I'm missing? Does the order in the .pro file matter?

    Thanks,
    Jeff

    1 Reply Last reply
    0
    • Y Offline
      Y Offline
      yuvaram
      wrote on 27 Apr 2016, 18:34 last edited by
      #2

      HI,
      use
      DEFINES += SOMEDEFINE

      Yuvaram Aligeti
      Embedded Qt Developer
      : )

      1 Reply Last reply
      2
      • J Offline
        J Offline
        jwomble
        wrote on 27 Apr 2016, 20:14 last edited by
        #3

        Sorry, that was a typo. I am using DEFINES:
        DEFINES += MY_DEFINE

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 27 Apr 2016, 22:01 last edited by
          #4

          Hi,

          Did you re-run qmake after changing the DEFINES ?

          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

          1/4

          27 Apr 2016, 18:33

          • Login

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