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. Path to the executable points to debug version in release mode with Qt Creator 4.12.4
Forum Updated to NodeBB v4.3 + New Features

Path to the executable points to debug version in release mode with Qt Creator 4.12.4

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 599 Views 1 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.
  • M Offline
    M Offline
    MarKS
    wrote on 26 Aug 2020, 06:49 last edited by
    #1

    I built a cmake project in debug and release versions using Qt Creator and Visual Studio 2015 cmake generator. In debug version, path to the executable (set automatically by QtCreator) is set to projectpath_Debug\DEPLOY\bin\Debug\projectd.exe and the working directory to projectpath_Debug\DEPLOY\bin\Debug which is correct.

    But in release mode, it points to the right build directory projectpath_Release but the path to the executable still tries to search Debug folder like projectpath_Release\DEPLOY\bin\Debug\projectd.exe and the working directory is set to
    projectpath_Release\DEPLOY\bin\Debug

    Problems:

    • Why is it searching for Debug folder in release build?

    • Changing the working directory in release mode to point to release projectpath_Release\DEPLOY\bin\Release changes the working directory for Debug configuration as well.

    • Checking the QtCreator variables/macros current values of the paths are all pointing to Debug folder and projectd.exe . Even in release configuration.

    PS: I am on Qt 5.7.1 with Qt Creator recently updated to 4.12.4 on Win 10

    M 1 Reply Last reply 28 Aug 2020, 08:21
    0
    • M MarKS
      26 Aug 2020, 06:49

      I built a cmake project in debug and release versions using Qt Creator and Visual Studio 2015 cmake generator. In debug version, path to the executable (set automatically by QtCreator) is set to projectpath_Debug\DEPLOY\bin\Debug\projectd.exe and the working directory to projectpath_Debug\DEPLOY\bin\Debug which is correct.

      But in release mode, it points to the right build directory projectpath_Release but the path to the executable still tries to search Debug folder like projectpath_Release\DEPLOY\bin\Debug\projectd.exe and the working directory is set to
      projectpath_Release\DEPLOY\bin\Debug

      Problems:

      • Why is it searching for Debug folder in release build?

      • Changing the working directory in release mode to point to release projectpath_Release\DEPLOY\bin\Release changes the working directory for Debug configuration as well.

      • Checking the QtCreator variables/macros current values of the paths are all pointing to Debug folder and projectd.exe . Even in release configuration.

      PS: I am on Qt 5.7.1 with Qt Creator recently updated to 4.12.4 on Win 10

      M Offline
      M Offline
      MarKS
      wrote on 28 Aug 2020, 08:21 last edited by
      #2

      @MarKS I managed to find a temporary solution to generate and build successfully. Instead of using Visual Studio 2015 cmake generator i used NMake Makefiles Jom.

      Now, QtCreator identifies the executable correctly as the build doesn't create a debug or release folder inside the build folder for nmake i suppose. The path looks something like this projectpath_Debug\DEPLOY\bin\projectd.exe and projectpath_Release\DEPLOY\bin\project.exe for Debug and Release builds respectively.

      This should allow the user to at least get started on working with the project. But if someone is bound to use Visual Studio 2015 generator the problem still persists.

      PS: Changing the working directory in release mode to point to release projectpath_Release\DEPLOY\bin\Release changes the working directory for Debug configuration as well => STILL EXISTS!!! I have created a new thread for this issue.

      1 Reply Last reply
      0

      1/2

      26 Aug 2020, 06:49

      • Login

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