I compiled my project as 'release' and it's still depends on QtSvgd4.dll,QtGuid4.dll,QtCored4dll
-
Hello,
I'm trying to make a release version of my project, I compiled it as 'release' but it's still dependent on the dll's mentioned in the title (Doesn't start if they are not present in the exe dir).
How can I narrow down why this happens? What modules/ pro/ pri files I need to look in to, to stop this dependency.
What should I look for in those files?Thank you!
-
@Curtwagner1984
You might run whatever version of Dependency Walker currently runs on your version of Windows to see where these...d.dll
files are being requested from. -
This is exactly what I'm trying to do but so far I'm lost.
I've printed out the imports my depencey walker sees:
Import from module QtCored4.dll : Function _Z11qt_assert_xPKcS0_S0_i Function _Z13qFlagLocationPKc Function _Z17qt_message_output9QtMsgTypePKc Function _Z21qRegisterResourceDataiPKhS0_S0_ Function _Z23qUnregisterResourceDataiPKhS0_S0_ Function _Z5qFreePv Function _Z6qDebugPKcz Function _Z7qMemSetPvij Function _Z8qWinMainP11HINSTANCE__S0_PciRiR7QVectorIS1_E Function _Z9qBadAllocv Function _Z9qt_assertPKcS0_i Function _ZN10QByteArray7reallocEi Function _ZN11QMetaObject18connectSlotsByNameEP7QObject Function _ZN11QMetaObject8activateEP7QObjectPKS_iPPv Function _ZN11QTextStream8readLineEx Function _ZN11QTextStreamC1EP7QString6QFlagsIN9QIODevice12OpenModeFlagEE Function _ZN11QTextStreamC1EP9QIODevice Function _ZN11QTextStreamD1Ev Function _ZN11QTextStreamlsEPKc Function _ZN11QTextStreamlsEPKv Function _ZN11QTextStreamlsERK7QString Function _ZN11QTextStreamlsEc Function _ZN11QTextStreamlsEd Function _ZN11QTextStreamlsEi Function _ZN11QTextStreamlsEs Function _ZN11QVectorData10reallocateEPS_iii Function _ZN11QVectorData11shared_nullE Function _ZN11QVectorData4freeEPS_i Function _ZN11QVectorData4growEiiib Function _ZN11QVectorData8allocateEii Function _ZN16QCoreApplication13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE Function _ZN16QCoreApplication9translateEPKcS1_S1_NS_8EncodingE Function _ZN21QPersistentModelIndexC1ERKS_ Function _ZN21QPersistentModelIndexD1Ev Function _ZN4QDirC1ERK7QString Function _ZN4QDirD1Ev Function _ZN4QUrl13fromLocalFileERK7QString Function _ZN4QUrlC1ERK7QStringNS_11ParsingModeE Function _ZN4QUrlD1Ev Function _ZN5QChar9fromAsciiEc Function _ZN5QCharC1Ec Function _ZN5QFile4openE6QFlagsIN9QIODevice12OpenModeFlagEE Function _ZN5QFile5closeEv Function _ZN5QFile6existsERK7QString Function _ZN5QFileC1ERK7QString Function _ZN5QFileD1Ev Function _ZN5QTime11currentTimeEv Function _ZN5QTime7isValidEiiii Function _ZN5QTimeC1Eiiii Function _ZN6QTimer11setIntervalEi Function _ZN6QTimer4stopEv Function _ZN6QTimer5startEi Function _ZN6QTimer5startEv Function _ZN6QTimerC1EP7QObject Function _ZN6QTimerD1Ev
To try to search for the functions imported from the module in my code, but I see many standard QT functions there like start timer, QTextStream etc...
-
@Curtwagner1984
This is not the kind of output I was looking for. The old Dependency Walker was a visual tool, and it would have shown us which DLLs were calling for the*D.DLL
s we want to track down. Your "function imports" are not useful in this regard.What "Dependency Walker" tool do you use? Can you ask it to display just the DLL-file to DLL-file dependencies, not a listing of functions/imports? Or find a "Dependency Walker" that works for your version of Windows if it is Win 10+?
-
You're talking about this:
So far all the Qt modules I see are without the d. But there are a lot to look through and there is no search function I can see.
-
Is there something in the qmake files, configuration files etc, that might forces the build to require debug files like QtCored4.dll?
-
@Curtwagner1984 said in I compiled my project as 'release' and it's still depends on QtSvgd4.dll,QtGuid4.dll,QtCored4dll:
You're talking about this:
Indeed. But I thought it no longer works under Win 10+. Yes you have to look through!
If you cannot find them:
, I compiled it as 'release' but it's still dependent on the dll's mentioned in the title (Doesn't start if they are not present in the exe dir).
Make absolutely sure you really are running the build release
.exe
, not somehow still the debug one! Because that screenshot shows it using non-D
versions of theDLL
s. -
Make absolutely sure you really are running the build release .exe
I deleted the whole build folder before trying. And the folder name Qt Creator generates has a 'Release' postfix in the name. And there is only one
exe
file inside.In the GUI interface of the dependency walker I couldn't find a single mention of the
D
version of the DLLs. However as I said before, when I print the function calls, it does use the D version. And if I just don't copy over the D version of the DLL the exe won't start. -
@Curtwagner1984 said in I compiled my project as 'release' and it's still depends on QtSvgd4.dll,QtGuid4.dll,QtCored4dll:
I couldn't find a single mention of the D version of the DLLs
Are you sure? Please go to the lower window, sort by name and look if there's really no dependency. Do you maybe dynamically load a plugin which depends on the debug libs?
-
@Christian-Ehrlicher said in I compiled my project as 'release' and it's still depends on QtSvgd4.dll,QtGuid4.dll,QtCored4dll:
Do you maybe dynamically load a plugin which depends on the debug libs?
Maybe, How can if find this out? This isn't a project I wrote from the ground up. I inherited it from someone else.
Now when I think about it, I think I saw somewhere in the qMake files that it links against a debug version of Qwt no matter what type of build is used.
Is it possible that this is the dll that requires the debug versions of Qtcore?
-
@Curtwagner1984 said in I compiled my project as 'release' and it's still depends on QtSvgd4.dll,QtGuid4.dll,QtCored4dll:
Is it possible that this is the dll that requires the debug versions of Qtcore?
Yes, but as I said - look in DependencyWalker in the bottom window, sort by name and you will see the Qt debug dlls for sure then. Double click on them (or right click, don't remember) to reveal from where the dependency comes from.
-
@Christian-Ehrlicher
Yes indeed, you were right:
It's indeed because of the QWTD.DLL
-
You must not mix debug and release dlls on windows - fix it by using the release qwt dll.