I have this strange problem where running the release version of my GUI app on Windows crashes at startup and prints out the following (abridged) output:
Starting C:........\build-WindowsUI-Desktop_Qt_5_4_0_MSVC2010_OpenGL_32bit-Release\release\WindowsUI.exe...
The program has unexpectedly finished.
C:.............\build-WindowsUI-Desktop_Qt_5_4_0_MSVC2010_OpenGL_32bit-Release\release\WindowsUI.exe crashed
There is no other information given. Compiler output seems normal and no crash detailed information is printed. When I run the debug version: everything is fine. The GUI runs normally and no problems encountered.
Has anyone else encountered something like this before? I'm stuck here.
Thank you Mailerdaimon!
I took at look at my QT project file. In my .pro file I tell the linker to use specific dlls for release and debug mode. Based on your idea, I tried commenting out the sections that specify the dlls based on which type of executable was being outputted:
#win32|win64:debug {
# need to link DLL versions of library for Debug
#LIBS += -L"../ThirdParty/thirdPartyDlls" \
#
# -lthirdPartyD
#
#}
#win32|win64:release {
# need to link DLL versions of library for release
LIBS += -L"../ThirdParty/thirdPartyDlls" \
-lthirdParty
#}
And now release mode works! I guess I used the wrong syntax in the .pro file or maybe it's a bug in Qt Creator. Either way I got it working now :). Thanks again!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.