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. How to use debug/release switch in *.pro?
Forum Updated to NodeBB v4.3 + New Features

How to use debug/release switch in *.pro?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 721 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.
  • fasixF Offline
    fasixF Offline
    fasix
    wrote on last edited by
    #1

    How to use debug/release switch in *.pro?

    I have installed qt-4.8.6,worked with qt-creator2.7.0.

    I created a project, and I want to make it different between debug and release, such as:

    debug{

    config += APP_OUTPUT_DEBUG_LOG_ON
    

    }else{

    config+=APP_OUTPUT_DEBUG_LOG_OFF
    

    }

    but It seems no effect, Because it always performed the first swtich:
    ------ APP_OUTPUT_DEBUG_LOG_OFF.

    when i output the config value:
    message(config)

    It always contains both debug and release, perhaps this is the original reason.

    How can I fix this?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      Gerd
      wrote on last edited by
      #2

      try
      CONFIG(debug, debug|release) {
      #debug settings here....
      }else{
      #release settings here....
      }

      fasixF 1 Reply Last reply
      4
      • G Gerd

        try
        CONFIG(debug, debug|release) {
        #debug settings here....
        }else{
        #release settings here....
        }

        fasixF Offline
        fasixF Offline
        fasix
        wrote on last edited by
        #3

        @Gerd

        It worked, Thank you very much!

        1 Reply Last reply
        1

        • Login

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