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. creator switching between debug and release modes
Forum Updated to NodeBB v4.3 + New Features

creator switching between debug and release modes

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
creatorswitch modes
4 Posts 2 Posters 1.7k Views 2 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.
  • K Offline
    K Offline
    koahnig
    wrote on last edited by
    #1

    Once in awhile I run into the problem that some code is obviously not compiled. Unfortnautely it typically takes too long until one recognizes.

    I have a project based on subdirs template and there is an application compiled with a serious of dlls. In order to have a consistent solution I had rerun qmake and a rebuild. The application had been compiled and generated in release mode. This application is started in parallel a couple of times and a special configuration had problems and needed debugging. I led the other applications continue to run in release and simply change the settings while clicking on the left lower corner project button and changed to debug.

    Most likely neither the application nor its dlls had been compiled, which was ok since all was in the right state. I had started the application a couple of times in debug mode while pressing F5 and narrowed down the actual problem and fixed it. I started the build which not be finished because the dll with the fix could not be written, because it was used by a process. I stopped all those processes still running in release mode and started the build again. This time it completed successfully.

    Starting all my processes in release mode was successful. Also the application with the special settings. I have checked and the dll has been compiled in release mode. However, the setting in creator still says debug.

    I can't believe that this is possible. I would expect that creator is switched and the proper make files, in my case the version with debug settings is used. However, it obviously is not.

    Is this a known issue?

    Vote the answer(s) that helped you to solve your issue(s)

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I'm not aware of such a case but I wouldn't be surprised that you found out something.

      Can you reliably reproduce this ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      K 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        I'm not aware of such a case but I wouldn't be surprised that you found out something.

        Can you reliably reproduce this ?

        K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        @SGaist

        I have not tried to reproduce it in small sample case, yet. I seem to have this issue already quite some time and it is not limited to creator v4.1.0 and dates back to at least v3s.

        Anyway in past I used self-compiled versions and I was not sure if my .pro, .pri are setup in wrong way and causing my issues. On the other we all were getting used to rerun qmake and rebuild.

        Some time ago I have my naming convention of targets. I do it as Qt libs and add a 'D' for debug. This allows debug and release of the same application running at the same time. Also you change some dlls for debugging while those are used by other apps.

        Anyway I noticed that some times apparently the dlls are produced in the wrong mode. BTW this is on win 10 64 bit.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • K Offline
          K Offline
          koahnig
          wrote on last edited by
          #4

          Did some simple tests and unfortunately cannot reproduce with small sample.

          I have created a default application with

          QT += core
          QT -= gui
          
          CONFIG += c++11
          
          TARGET = ModeTest
          CONFIG += console
          CONFIG -= app_bundle
          
          TEMPLATE = app
          
          CONFIG(debug, debug|release):TARGET = $$join(TARGET,,,"DebugMode")
          message("TARGET     " $$TARGET)
          
          DESTDIR = c:/Source/Utilities
          
          SOURCES += main.cpp
          

          and

          #include <QCoreApplication>
          
          int main(int argc, char *argv[])
          {
              QCoreApplication a(argc, argv);
          
              return a.exec();
          }
          

          When changing on the left side in creator from debug to release forward and back the name of the exe is always correctly displayed based on chosen on chosen mode. Also the exe can be produced and file sizes are as to be expected.

          As next I have added a subdirs project which is using the project above.

          TEMPLATE = subdirs
          
          SUBDIRS = ModeTest
          
          ModeTest.subdir = ../ModeTest
          

          The same. My problem cannot be reproduced easily. Possibly the problem is triggered by other actions in between, but no clue at the moment.

          Vote the answer(s) that helped you to solve your issue(s)

          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