Qt应用程序:无法加载平台插件“windows”。可用的平台是:

时间:2023-01-21 11:50:16

I've compiled Qt 5.0.0 with msvc2010 because I need opengl with configure string

我用msvc2010编译了Qt 5.0.0,因为我需要配置字符串的opengl

configure -prefix %CD%\qtbase -opensource -nomake -nomake examples -nomake demo -opengl desktop -platform win32-msvc2010

Now I can start Qt application from QtCreator only. I've put application in WinDBG it's output below

现在我只能从QtCreator启动Qt应用程序。我把应用程序放在WinDBG下面的输出中

CommandLine: D:\work\workspace\WellReader_0_1-build-Qt_5_0_0_msvc2010_opengl-Release\release\WellReader_0_1.exe
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path.           *
* Use .symfix to have the debugger choose a symbol path.                   *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is: 
ModLoad: 00120000 00132000   image00120000
ModLoad: 77900000 77a3d000   ntdll.dll
ModLoad: 774b0000 77584000   C:\Windows\system32\kernel32.dll
ModLoad: 75b60000 75baa000   C:\Windows\system32\KERNELBASE.dll
ModLoad: 59d30000 59df8000   C:\Windows\system32\OPENGL32.dll
ModLoad: 77020000 770cc000   C:\Windows\system32\msvcrt.dll
ModLoad: 775f0000 77690000   C:\Windows\system32\ADVAPI32.dll
ModLoad: 77b10000 77b29000   C:\Windows\SYSTEM32\sechost.dll
ModLoad: 77a50000 77af2000   C:\Windows\system32\RPCRT4.dll
ModLoad: 76340000 7638e000   C:\Windows\system32\GDI32.dll
ModLoad: 76070000 76139000   C:\Windows\system32\USER32.dll
ModLoad: 77a40000 77a4a000   C:\Windows\system32\LPK.dll
ModLoad: 77690000 7772d000   C:\Windows\system32\USP10.dll
ModLoad: 71a30000 71a52000   C:\Windows\system32\GLU32.dll
ModLoad: 71500000 715e7000   C:\Windows\system32\DDRAW.dll
ModLoad: 71620000 71626000   C:\Windows\system32\DCIMAN32.dll
ModLoad: 75d70000 75f0d000   C:\Windows\system32\SETUPAPI.dll
ModLoad: 75d20000 75d47000   C:\Windows\system32\CFGMGR32.dll
ModLoad: 770d0000 7715f000   C:\Windows\system32\OLEAUT32.dll
ModLoad: 75f10000 7606c000   C:\Windows\system32\ole32.dll
ModLoad: 75be0000 75bf2000   C:\Windows\system32\DEVOBJ.dll
ModLoad: 743d0000 743e3000   C:\Windows\system32\dwmapi.dll
ModLoad: 5a1f0000 5a23b000   D:\work\workspace\WellReader_0_1-build-Qt_5_0_0_msvc2010_opengl-Release\release\Qt5OpenGL.dll
ModLoad: 59910000 59d22000   D:\work\workspace\WellReader_0_1-build-Qt_5_0_0_msvc2010_opengl-Release\release\Qt5Widgets.dll
ModLoad: 763d0000 7701a000   C:\Windows\system32\SHELL32.dll
ModLoad: 77590000 775e7000   C:\Windows\system32\SHLWAPI.dll
ModLoad: 59650000 59910000   D:\work\workspace\WellReader_0_1-build-Qt_5_0_0_msvc2010_opengl-Release\release\Qt5Gui.dll
ModLoad: 59250000 5964c000   D:\work\workspace\WellReader_0_1-build-Qt_5_0_0_msvc2010_opengl-Release\release\Qt5Core.dll
ModLoad: 76390000 763c5000   C:\Windows\system32\WS2_32.dll
ModLoad: 77360000 77366000   C:\Windows\system32\NSI.dll
ModLoad: 687b0000 68819000   C:\Windows\system32\MSVCP100.dll
ModLoad: 67930000 679ef000   C:\Windows\system32\MSVCR100.dll
(116c.16cc): Break instruction exception - code 80000003 (first chance)
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll - 
eax=00000000 ebx=00000000 ecx=0030f8d4 edx=779470f4 esi=fffffffe edi=00000000
eip=779a058e esp=0030f8f0 ebp=0030f91c iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
ntdll!LdrVerifyImageMatchesChecksum+0x633:
779a058e cc              int     3
0:000> g
ModLoad: 75d50000 75d6f000   C:\Windows\system32\IMM32.DLL
ModLoad: 77830000 778fc000   C:\Windows\system32\MSCTF.dll
ModLoad: 75a10000 75a45000   C:\Windows\system32\nvinit.dll
ModLoad: 75940000 7594c000   C:\Windows\system32\cryptbase.dll
Failed to load platform plugin "windows". Available platforms are: 

*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\system32\kernel32.dll - 
eax=00000000 ebx=00000001 ecx=0030fa38 edx=00000020 esi=779d7380 edi=779d7340
eip=779470f4 esp=0030fa88 ebp=0030faa4 iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
ntdll!KiFastSystemCallRet:
779470f4 c3              ret
0:000> g
       ^ No runnable debuggees error in 'g'

Where I can take plugin "windows"? Or should I recompile Qt with another configure options? Please advice

我可以在哪里采取插件“窗口”?或者我应该使用其他配置选项重新编译Qt?请指教

1 个解决方案

#1


11  

I haven't looked at Qt 5.0 yet, but if they have plugin platforms now, you have to make sure your app can find them at runtime. Apparently QtCreator sets up PATH properly, so all the plugins are there, no need to rebuild Qt.

我还没有看过Qt 5.0,但如果他们现在有插件平台,你必须确保你的应用程序可以在运行时找到它们。显然QtCreator正确设置PATH,因此所有插件都在那里,无需重建Qt。

Find the plugins folder, copy necessary plugins into your install folder (make sure to keep the structure, so "plugins/imageformats/.../bla.dll", etc), create qt.conf file and set plugins path to be ".". Drop qt.conf file into your install folder as well.

找到plugins文件夹,将必要的插件复制到你的安装文件夹中(确保保留结构,所以“plugins / imageformats /.../ bla.dll”等),创建qt.conf文件并设置插件路径为“ “。将qt.conf文件也放入安装文件夹中。

#1


11  

I haven't looked at Qt 5.0 yet, but if they have plugin platforms now, you have to make sure your app can find them at runtime. Apparently QtCreator sets up PATH properly, so all the plugins are there, no need to rebuild Qt.

我还没有看过Qt 5.0,但如果他们现在有插件平台,你必须确保你的应用程序可以在运行时找到它们。显然QtCreator正确设置PATH,因此所有插件都在那里,无需重建Qt。

Find the plugins folder, copy necessary plugins into your install folder (make sure to keep the structure, so "plugins/imageformats/.../bla.dll", etc), create qt.conf file and set plugins path to be ".". Drop qt.conf file into your install folder as well.

找到plugins文件夹,将必要的插件复制到你的安装文件夹中(确保保留结构,所以“plugins / imageformats /.../ bla.dll”等),创建qt.conf文件并设置插件路径为“ “。将qt.conf文件也放入安装文件夹中。