Qt Creator 4.7.2 update problems
-
No, they also don't have .exe suffix in new Qt Creator.
In old Qt Creator application output when launching starts with:
Starting D:\Projects\build-MyProject-Desktop_Qt_5_7_0_MSVC2013_32bit-Debug\MyApp\debug\MyApp.exe...
Whereas in new Qt Creator, as I have already written, there is no .exe suffix. Is this the issue? However, I still don't understand how it is possible that two projects can run and one not.
@MartinD said in Qt Creator 4.7.2 update problems:
However, I still don't understand how it is possible that two projects can run and one not.
It could still be that the program crashes because it cannot load a dependent library. Have you checked if you can start the app outside Creator?
-
Yes, the app can run outside Qt Creator. Also, Qt Creator 4.0.3 can launch this app. Only new Qt Creator 4.7.2 can't launch it.
-
It is not the same:
Executable is "D:\Projects\build-MyProject-Qt_5_7_0_MSVC2013_32bit-Debug\MyApp\debug\MyApp"
Working dir is "D:\Projects\build-MyProject-Qt_5_7_0_MSVC2013_32bit-Debug\MyApp"I also tried to minimize my problematic executable project by compiling only empty main function. The executable now links only to some system dlls. Still the same issue.
@MartinD said in Qt Creator 4.7.2 update problems:
Executable is "D:\Projects\build-MyProject-Qt_5_7_0_MSVC2013_32bit-Debug\MyApp\debug\MyApp"
Working dir is "D:\Projects\build-MyProject-Qt_5_7_0_MSVC2013_32bit-Debug\MyApp"Try to change the working directory to "D:\Projects\build-MyProject-Qt_5_7_0_MSVC2013_32bit-Debug\MyApp\debug"
And compare these settings with QtCreator 4.0.3
-
Already tried setting working directory to that.
The difference is, that in Qt Creator 4.0.3 the Executable has .exe suffix, there is D:\Projects\build-MyProject-Qt_5_7_0_MSVC2013_32bit-Debug\MyApp\debug\MyApp.exe
-
@MartinD Please check the Run Environment (Project > Build & Run > Run > Run Settings > Run Environment - especially PATH. I'm pretty sure it's related to something there.
@aha_1980 Thanks for that point. I found that old Qt Creator adds multiple x64 paths to PATH (my app is 32 bit), e.g.:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools\x64
C:\Program Files (x86)\Windows Kits\8.1\bin\x64
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\Whereas new Qt Creator has:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools
C:\Program Files (x86)\Windows Kits\8.1\bin\x86
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\Otherwise, the PATH is same. Changing the PATH in new Qt Creator to what old Qt Creator uses has no effect.
-
@aha_1980 Thanks for that point. I found that old Qt Creator adds multiple x64 paths to PATH (my app is 32 bit), e.g.:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools\x64
C:\Program Files (x86)\Windows Kits\8.1\bin\x64
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\Whereas new Qt Creator has:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Performance Tools
C:\Program Files (x86)\Windows Kits\8.1\bin\x86
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\Otherwise, the PATH is same. Changing the PATH in new Qt Creator to what old Qt Creator uses has no effect.
I intentionally corrupted PATH variable in my Run Settings in new Qt Qreator for project that I'm able to launch and there is in application output:
10:36:14: The program has unexpectedly finished.
10:36:14: The process was ended forcefully.I.e. different error message from what I get:
16:55:48: Failed to start program. Path or permissions wrong?
16:55:48: D:/MyProject/debug/MyAppexited with code -1It seems that PATH is set correctly.
-
I have the same message error with a new created project (QtCreator v4.9.2)
("...exited with code -1 \n The process failed to start. Either the invoked program ... is missing, or you may have insufficient permissions to invoke the program.")
I compared the run config with my others olders projects, and finaly I unchecked the "run in terminal".
Now, I'm able to run my project with QtCreator. -
I had the same problem in a Linux and the root of the problem for me was a misconfiguration in the Kit (it was preventing me to choose a device, in my case it was impossible to change the options and I had to create a new one):
To fix this:- Open QtCreator
- Go to the Projects tab
- Remove or disable your currently Build & Run kit
- Add a new one, make sure your configurations are correct, your debuggers, compilers and Qt version paths are pointing in the right direction.
- Enable this new kit for your project
-
I had the same problem in a Linux and the root of the problem for me was a misconfiguration in the Kit (it was preventing me to choose a device, in my case it was impossible to change the options and I had to create a new one):
To fix this:- Open QtCreator
- Go to the Projects tab
- Remove or disable your currently Build & Run kit
- Add a new one, make sure your configurations are correct, your debuggers, compilers and Qt version paths are pointing in the right direction.
- Enable this new kit for your project
@Mariana-Meireles yeah, such things sometimes happen after Creator updates. The sledgehammer solution is to quit Creator, delete the .pro.user and the build directories, and the restart Creator.
But your solution should work too.
Regards