Qt 64 bits application
-
PE32+ looks right for 64-bit.
What exact error message do you get at runtime now? Do you get any clue as to why/where/on what it is happening, like mentioning a DLL it cannot load? If you run it from a debugger do you maybe get any better information?
You may have to download and use something like https://github.com/lucasg/Dependencies to examine your.exe
/each of the.dll
s to discover if there is any 32-bit somewhere. It might be on some DLL indirectly required by another DLL. -
Hi JonB,
The error popup I got is the following:
It does not help at all..
Good idea to try to execute it with the debugger ! This is what I got:
It's very strange.. It looks like Qt (or Qt Creator) is looking for a file on a different branch (which completely out of the project main folder) of the same project.. But in the .pro file, it is referring only to files in the project.
It would be easier if I share the content of the .pro file. I should have done earlier.
Obviously, I am cleaning and rebuilding each time I am trying something new.
I also has a look at the .pro.user file but there is no reference to "CAN Converter model clone/branches/CAN-4_lbf_asc_extension_support"
Have a nice day,
Pierre-Emmanuel -
@Pierre-Emmanuel
Not sure what this tells us. I think the second error message screenshot is not from the "failure to load" some DLL itself but rather the debugger is trying to fetch the source file for where some error occurred and cannot locate the.cpp
source file it wants somewhere inside whatever CAN stuff is all about.I am not a Windows expert so not sure how you proceed. I would probably have a go with the https://github.com/lucasg/Dependencies tool I mentioned to examine the EXE/DLL files I have for their dependencies to see if I could spot something wrong/16-bit. It's probably a good tool to get compiled and working for Windows development in general, so worth spending a few minutes on.
P.S.
You could Googlematlab 0xc000007b
. Something like https://stackoverflow.com/questions/6458271/matlab-engine-windows-7-problem saysThis error is likely due to incorrect installation or multiple installations of Matlab on your machine. Check your Windows %PATH% environment variable [...]
Since you used to work with 32-bit matlab perhaps some vestige of this is left around and on your
PATH
. Check what is in theR2022b\runtime\win64
directory, but also what is inR2022b\bin
. Do you need that, or could you remove that? You might try removing both of those from yourPATH
and resort to copying DLLs one by one from directories to the directory of your executable while you figure out what what exactly it needs to run. -
I used the dependencies program to check my application,
The first time I got missing dll from Qt6 so I updated the system PATH to have C:\Qt\6.8.1\mingw_64\bin. It fixed all missing dlls related to Qt but still some of them are missing, which seems to be related to Windows:
ext-ms-win-oobe-query-11-1-0.dll
ext-ms-win32-subsystem-query-11-1-0.dll
HvsiFileTrust.dllThere is some other missing, which seems to be related to matlab:
libmwfl.dll
libmwi18n.dll
libut.dll
libmwcppmicroservices.dll
mwboost_log-vc142-mt-x64-1_75.dll
CppMicroServices3.dll
hdf5-1.8.dll
icuuc69.dllI will add them manually.
I will also uninstall old matlab version I am not using anymore and see if it change something.
Have a nice day,
Pierre-Emmanuel -
@Pierre-Emmanuel
I will just say you may be disappearing down a rabbit hole. I think some of these might be "false negatives" reported by the tool, e.g. see https://www.reddit.com/r/AskProgramming/comments/xxzpfk/reputable_sources_for_missing_dlls/ has a couple of yours, I don't know.Maybe it's time for you to find a matlab forum and ask for help/clues/pointers there for whatever your issue is?
-
I think it is yes,
Thank you JonB and SGaist for helping me.
I will keep posting here if I have more details or more founding !
-
What I would do is to empty the PATH environnement variable in Qt Creator and add yourself what is required for your application to work so it only contains entries pertinent to your application just to be sure there's no other DLLs found beside the ones your really need.
-
Hi SGaist,
Sorry I come back to this topic quite late.
I asked the question HERE on the matlab forum.I have tried clearing the PATH environment variable from Qt Creator by checking "Clear System environment" checkbox:
But then I got new issues to build the app like:
I guess I need to keep some environment variables ?
Thank you for you help,
Have a nice day,Pierre-Emmanuel
-
@Pierre-Emmanuel said in Qt 64 bits application:
by checking "Clear System environment" checkbox
Why? Only change PATH, nothing else.
-
I have found it !!!!!
Thank you @jsulm for this info, it solved the new problems I was facing !
The problem was coming from the fact that Qt Creator does not search recursively in the folders.
In the PATH environment variable, I had the following path <matlab_folder>\R2022b\bin registered. But the missing dlls were in <matlab_folder>\R2022b\bin\win64 ...
Once I updated the PATH in Qt Creator, I could run the application as before !!
Thank you very much guys, you all have been of great help !
On my side the problem is solved, I will also update the matlab forum.
Have a very good week,
Pierre-Emmanuel -
@Pierre-Emmanuel Glad you found out but it has nothing to do with Qt Creator, that's how the PATH environment variable works on Windows.
-
Maybe or maybe not ?
I mean, I had something working with Qt 5.15 (I don't remember Qt Creator version at that moment), I did not change my PATH environment variable, and when I upgraded to Qt 6.8.1, it was not working anymore.
I thought Qt would search recursively in the folders registered in the PATH and I was wrong.
Thank you for your help,
Have a nice day,
Pierre-Emmanuel -
-
@Pierre-Emmanuel said in Qt 64 bits application:
Maybe or maybe not ?
Not "maybe". Creator (nor Qt itself) has nothing to do with runtime searching for libraries/DLLs for an executable. That is done by the OS/Windows, and that requires them to be found on either
PATH
or in the same directory as the executable. This would also be the case if you ran your program quite outside of Creator. No OS searchesPATH
recursively (would be too slow and too dangerous). So something has changed between your Qt5/6 or its environment.