Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QMake DEFINES variable
Forum Updated to NodeBB v4.3 + New Features

QMake DEFINES variable

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 3 Posters 4.4k 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.
  • U Offline
    U Offline
    Uflex
    wrote on last edited by
    #1

    Hi,

    I've got a function call in a SDK that is not defined any more so I need to remove it. I don't really want to touch the SDK source code so I thought that I could use a macro to remove the call, this works fine:

    @#define functionToRemove(arg)
    functionToRemove("test");@

    But this implies to modify the SDK or one of the included files and as I said, I'd rather not. Is it possible to write that #define inside the .pro file? I tried many combinations with the DEFINES variable but none seems to work.

    @DEFINES += functionToRemove(arg)
    DEFINES += functionToRemove(arg)=
    DEFINES += "functionToRemove(arg)="
    DEFINES += functionToRemove(arg)=//
    DEFINES += "functionToRemove(arg)=/
    /"@

    Did I miss something or is it just not possible to do that kind of things?

    1 Reply Last reply
    0
    • H Offline
      H Offline
      Hostel
      wrote on last edited by
      #2

      Maybe check this "post":http://www.qtcentre.org/threads/29104-QMake-DEFINES?p=237294#post237294 from another forum. Write if this helps.

      1 Reply Last reply
      0
      • U Offline
        U Offline
        Uflex
        wrote on last edited by
        #3

        I've already seen that but it didn't work ... I think it is the parameter that is causing these problems

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tzander
          wrote on last edited by
          #4

          you must escape the braces, there is no need to have an equals sign, so I doubt that thats it.

          1 Reply Last reply
          0
          • U Offline
            U Offline
            Uflex
            wrote on last edited by
            #5

            I already tried but didn't succeed...

            @DEFINES += functionToRemove(arg)
            DEFINES += "functionToRemove(arg)"
            DEFINES += "functionToRemove(arg)"
            DEFINES += "functionToRemove(arg)"
            DEFINES += functionToRemove\(arg\)@

            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