Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Release app building debug versions
QtWS25 Last Chance

Release app building debug versions

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 1.9k 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.
  • M Offline
    M Offline
    mirswith
    wrote on last edited by
    #1

    Hi. I am having a problem where my debug cases in my .pro files are being built when I have my projects set to release. Here is the lay of the land.

    I have two projects. One is a DLL and one is an EXE, both are open in a single instance of Qt Creator. My EXE uses the DLL.

    My dll has this section for its debug and release differences:

    @
    win32:debug {
    LIBS += ../../common/openAL/windows/libs/Win32/OpenAL32.lib
    ../../common/boost_1_46_0/stage.win32/lib/libboost_system-vc90-mt-gd-1_46.lib
    ../../common/boost_1_46_0/stage.win32/lib/libboost_filesystem-vc90-mt-gd-1_46.lib
    }

    win32:release {
    LIBS += ../../common/openAL/windows/libs/Win32/OpenAL32.lib
    ../../common/boost_1_46_0/stage.win32/lib/libboost_system-vc90-mt-1_46.lib
    ../../common/boost_1_46_0/stage.win32/lib/libboost_filesystem-vc90-mt-1_46.lib
    }
    @

    And my EXE has these differences:

    @
    win32:debug{
    LIBS += ../MyDLL/MyDLL-build-desktop/debug/MyDLL.lib
    PRE_TARGETDEPS = ../MyDLL/MyDLL-build-desktop/debug/MyDLL.dll
    QMAKE_PRE_LINK = copy /Y "..\MyDLL\MyDLL-build-desktop\debug\MyDLL.dll" "debug"
    }

    win32:release{
    LIBS += ../MyDLL/MyDLL-build-desktop/release/MyDLL.lib
    PRE_TARGETDEPS = ../MyDLL/MyDLL-build-desktop/release/MyDLL.dll
    QMAKE_PRE_LINK = copy /Y "..\MyDLL\MyDLL-build-desktop\release\MyDLL.dll" "release"
    }
    @

    Now when I set Release mode for both of my projects and do a clean all/build all I am getting debug versions of msvcrt built into my release mode., if I comment out the debug sections in my .pro files then my build is correct without any debug libraries.

    Any ideas?

    Thanks.

    -=ben

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

      Hi ben,

      what I do is the following, and it works:

      @
      CONFIG(debug, debug|release)
      {
      DESTDIR = ../debug
      OBJECTS_DIR = ./tmp/debug
      MOC_DIR = ./tmp/moc/debug
      }
      else
      {
      DESTDIR = ../release
      OBJECTS_DIR = ./tmp/release
      MOC_DIR = ./tmp/moc/release
      }

      @

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mirswith
        wrote on last edited by
        #3

        That works. Thanks! Strange the other approach does not.

        -=ben

        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