Qt6 Widgets Application not working, exit code -1073741511
-
@Christian-Ehrlicher you're right, it's done here
@HQ2000 said in Qt6 Widgets Application not working, exit code -1073741511:foreach (QT_LIB Core Gui Widgets) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy "${QT_INSTALL_PATH}/bin/Qt6${QT_LIB}${DEBUG_SUFFIX}.dll" "$<TARGET_FILE_DIR:${PROJECT_NAME}>") endforeach (QT_LIB)
@HQ2000
So purely OOI could you comment on why thatforeach
has not copiedQt6Gui.dll
as I asked earlier? However you say you know it works without that, somehow.Confirm you are not building your project for debug?
Remove everything on your
PATH
environment variable so we know it is not picking something up somewhere? -
Don't do this. Adjust your PATH env var accordingly and use windeployqt when you want to deploy your app. Your are missing dll and plugins
-
@HQ2000
So purely OOI could you comment on why thatforeach
has not copiedQt6Gui.dll
as I asked earlier? However you say you know it works without that, somehow.Confirm you are not building your project for debug?
Remove everything on your
PATH
environment variable so we know it is not picking something up somewhere?@JonB copying dlls around manually is wrong. The PATH env var has to be adjusted.
-
@JonB copying dlls around manually is wrong. The PATH env var has to be adjusted.
@Christian-Ehrlicher
? Of course, I know! I was just trying to diagnose where the OP's problem might lie, given what is in the makefile. I posted before your post. -
@Christian-Ehrlicher
? Of course, I know! I was just trying to diagnose where the OP's problem might lie, given what is in the makefile. I posted before your post.@JonB said in Qt6 Widgets Application not working, exit code -1073741511:
where the OP's problem might lie,
The problem is, that he is copying only half of the required stuff because he is doing some strang stuff manually for no reason.
-
@JonB said in Qt6 Widgets Application not working, exit code -1073741511:
where the OP's problem might lie,
The problem is, that he is copying only half of the required stuff because he is doing some strang stuff manually for no reason.
@Christian-Ehrlicher so, what else should I get you? Also, the whole CMakeLists.txt file is standard in CLion. I did not write this.
Yes, I did some things manually on purpose. Private data.. -
As I already wrote - don't copy stuff around as it's wrong as it's missing things. Adjust your PATH var accordingly so that the Qt libs are properly found.
-
As I already wrote - don't copy stuff around as it's wrong as it's missing things. Adjust your PATH var accordingly so that the Qt libs are properly found.
@Christian-Ehrlicher
You mean I should just add their absolute paths to the PATH var? -
@Christian-Ehrlicher
You mean I should just add their absolute paths to the PATH var?@HQ2000 said in Qt6 Widgets Application not working, exit code -1073741511:
You mean I should just add their absolute paths to the PATH var?
Again: add the path to the Qt dlls to the PATH env var.
-
@HQ2000 said in Qt6 Widgets Application not working, exit code -1073741511:
You mean I should just add their absolute paths to the PATH var?
Again: add the path to the Qt dlls to the PATH env var.
-
@Christian-Ehrlicher
Did it, nothing changed. (I restarted the project, of course)
Same with deleting the associated environment vars@JonB
It did. But it is not needed, I viewed it in the Dependency Walker@HQ2000 said in Qt6 Widgets Application not working, exit code -1073741511:
Same with deleting the associated environment vars
Then you would get an error about missing dlls. You have some wrong dlls around somewhere.
Delete all dlls you copied around, don't copy dlls around in your CMakeLists.txt or anywhere else during your build, use a clean build dir, set the env var accordingly and start it from the command line where you also started the dependency tools from... -
@HQ2000 said in Qt6 Widgets Application not working, exit code -1073741511:
Same with deleting the associated environment vars
Then you would get an error about missing dlls. You have some wrong dlls around somewhere.
Delete all dlls you copied around, don't copy dlls around in your CMakeLists.txt or anywhere else during your build, use a clean build dir, set the env var accordingly and start it from the command line where you also started the dependency tools from...@Christian-Ehrlicher
I did not copy around any DLLs, this is a clean build dir (CLion pre-config)
I will try it.Added the env vars:
Still get the Error messages that exactly these ones are missing...
-
@Christian-Ehrlicher
I did not copy around any DLLs, this is a clean build dir (CLion pre-config)
I will try it.Added the env vars:
Still get the Error messages that exactly these ones are missing...
@HQ2000 said in Qt6 Widgets Application not working, exit code -1073741511:
Added the env vars:
You write that followed by a list of DLLs. What do you mean you did to what environment variable? Also you no longer list the Qt DLLs?
Still get the Error messages that exactly these ones are missing...
If you mean the 4 in that list are reported missing then you have not set your
PATH
correctly.I am lost.
-
@Christian-Ehrlicher
I did not copy around any DLLs, this is a clean build dir (CLion pre-config)
I will try it.Added the env vars:
Still get the Error messages that exactly these ones are missing...
@HQ2000 said in Qt6 Widgets Application not working, exit code -1073741511:
Added the env vars:
Why do you add some dlls? Please do what we tell you... otherwise we can't (and won't) help anymore.
What's so hard to understand? Add the path to your Qt dlls to your PATH environment variable... -
@HQ2000 said in Qt6 Widgets Application not working, exit code -1073741511:
Added the env vars:
Why do you add some dlls? Please do what we tell you... otherwise we can't (and won't) help anymore.
What's so hard to understand? Add the path to your Qt dlls to your PATH environment variable...