Path to the executable points to debug version in release mode with Qt Creator 4.12.4
-
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 toprojectpath_Debug\DEPLOY\bin\Debug\projectd.exe
and the working directory toprojectpath_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 searchDebug
folder likeprojectpath_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
-
-
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 toprojectpath_Debug\DEPLOY\bin\Debug\projectd.exe
and the working directory toprojectpath_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 searchDebug
folder likeprojectpath_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
@MarKS I managed to find a temporary solution to generate and build successfully. Instead of using
Visual Studio 2015 cmake generator
i usedNMake 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
andprojectpath_Release\DEPLOY\bin\project.exe
forDebug 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. -