当尝试在 Qt 5.1.1 中运行我的应用程序的调试版本时,我得到:
Starting C:\Users\Jared\Documents\Telkonet\serial_loader\branches\2.x\build-esu-Desktop_Qt_5_1_1_MinGW_32bit-Debug\debug\esu.exe...
The program has unexpectedly finished.
C:\Users\Jared\Documents\Telkonet\serial_loader\branches\2.x\build-esu-Desktop_Qt_5_1_1_MinGW_32bit-Debug\debug\esu.exe exited with code -1073741819
exe文件的ldd显示:
$ ldd build-esu-Desktop_Qt_5_1_1_MinGW_32bit-Debug/debug/esu.exe
ntdll.dll => /cygdrive/c/windows/SYSTEM32/ntdll.dll (0x7fed5810000)
ntdll.dll => /cygdrive/c/windows/SYSTEM32/ntdll.dll (0x77b00000)
wow64.dll => /cygdrive/c/windows/SYSTEM32/wow64.dll (0x77a40000)
wow64win.dll => /cygdrive/c/windows/system32/wow64win.dll (0x77aa0000)
wow64cpu.dll => /cygdrive/c/windows/system32/wow64cpu.dll (0x77a90000)
??? => ??? (0x2b0000)
KERNEL32.DLL => /cygdrive/c/windows/SYSTEM32/KERNEL32.DLL (0x76b80000)
??? => ??? (0x2b0000)
??? => ??? (0x2b0000)
KERNEL32.DLL => /cygdrive/c/windows/SYSTEM32/KERNEL32.DLL (0x76b80000)
KERNELBASE.dll => /cygdrive/c/windows/SYSTEM32/KERNELBASE.dll (0x76ad0000)
我的路径变量包括:
C:\Qt\Qt5.1.1\5.1.1\mingw48_32\lib\;
C:\Qt\Qt5.1.1\Tools\QtCreator\bin\;
C:\Qt\Qt5.1.1\5.1.1\mingw48_32\bin\;
C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\;
还值得注意的是,我在卸载 Qt 4.8.4 后刚刚安装了 Qt 5.1.1。
更新:
我浏览了所有源代码,并用 Q_OS_WIN 替换了所有 Q_WS_WIN 实例。现在我得到了这个:
Starting C:\Users\Jared\Documents\Telkonet\serial_loader\branches\2.x\debug\debug\esu.exe...
The program has unexpectedly finished.
C:\Users\Jared\Documents\Telkonet\serial_loader\branches\2.x\debug\debug\esu.exe exited with code -1073741515
将所需的 dll 放入调试文件夹后,我再次收到错误代码 1073741819。Main() 仍未到达。