QT Windows Desktop GUI程序在Release模式下崩溃但在Debug模式下不崩溃

QT Windows Desktop GUI program crashes in Release mode but does not crash in Debug mode

我有一个奇怪的问题,运行在 Windows 上使用我的 GUI 应用程序的发布版本在启动时崩溃并打印出以下(删节)输出:

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

没有提供其他信息。编译器输出似乎正常,没有打印崩溃详细信息。当我 运行 调试版本时:一切正常。 GUI 运行 正常,没有遇到任何问题。

有没有其他人遇到过这样的事情?我被困在这里了。

谢谢 Mailerdaimon!

我查看了我的 QT 项目文件。在我的 .pro 文件中,我告诉链接器使用特定的 dll 进行发布和调试模式。根据您的想法,我尝试根据输出的可执行文件类型注释掉指定 dll 的部分:

#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

#}

现在发布模式可用了!我想我在 .pro 文件中使用了错误的语法,或者它可能是 Qt Creator 中的错误。无论哪种方式,我现在都能正常工作:)。再次感谢!