Results 1 to 2 of 2

Thread: Defining specific preprocessor definitions according to build configuration

  1. #1
    Join Date
    Jan 2010
    Posts
    190
    Thanks
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Defining specific preprocessor definitions according to build configuration

    Hi! I would like to be able do define specific preprocessor definitions according to the build configuration I'm using.

    I have many build configurations defined in my mkspec, and I would like to define something different according to the platform I'm compiling for. According to the documentation I understood I had to use QMAKESPEC in my qmake.conf in the platform specification, but that seems not to work. I even tried to put a message($$QMAKESPEC) in my .pro file but I get nothing:

    Project MESSAGE:

    Any idea what I'm doing wrong or anyway how I can do what I'm trying to achieve?
    Thanks!

  2. #2
    Join Date
    Jan 2010
    Posts
    190
    Thanks
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Defining specific preprocessor definitions according to build configuration

    Solved the problem. I maybe misunderstood the documentation. It is not the QMAKESPEC to be modified but the CONFIG variable. Now it's working. Thanks!

Similar Threads

  1. Replies: 5
    Last Post: 14th February 2011, 14:06
  2. Conflicting header definitions
    By jacky in forum Qt Programming
    Replies: 13
    Last Post: 4th May 2009, 09:51
  3. QDomDocument and xml version/encoding definitions
    By estanisgeyer in forum Qt Programming
    Replies: 1
    Last Post: 18th September 2008, 14:34
  4. const member definitions in a class ....
    By TheKedge in forum General Programming
    Replies: 5
    Last Post: 15th February 2006, 13:03
  5. How to determine build configuration?
    By gadnio in forum Qt Programming
    Replies: 4
    Last Post: 1st February 2006, 12:58

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.