×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    How to define a macro variable in PRO file?

    In the Qt .pro file you can use "DEFINES" to define macro variables, but how do you give them values? I tried just using
    Code:
    DEFINES += MAC_VAR=someValue
    but that doesn't seem to assign the value -- it evaluates to "MAC_VAR" in the compiler.

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: How to define a macro variable in PRO file?

    Apparently the problem is at least part on the C preprocessor side. The "#" operator for quoting doesn't seem to do macro substitution first.

    ================

    Oops -- my bad! It's a quirk of the macro processor, I guess. Found the standard work-around.

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    1,236

    Re: How to define a macro variable in PRO file?

    Hi,

    What was the work, could you paste it here.

    -Srikanth
    Regards,
    Sriky

  4. #4
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: How to define a macro variable in PRO file?

    You have to embed the macro in another macro, or some such. I don't recall the specifics right now.

Similar Threads

  1. Replies: 1
    Last Post: 2005-05-26, 14:22
  2. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31
  3. Replies: 0
    Last Post: 2002-06-10, 12:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •