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

Setting DEFINE in .pro file not working

Scheduled Pinned Locked Moved Unsolved General and Desktop
creatorqmake
4 Posts 3 Posters 2.5k Views 2 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 A Former User
    #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
    • yuvaramY Offline
      yuvaramY Offline
      yuvaram
      wrote on last edited by
      #2

      HI,
      use
      DEFINES += SOMEDEFINE

      Yuvaram Aligeti
      Embedded Qt Developer
      : )

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

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

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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

          • Login

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