Windows 上的 DialogBlocks:缺少 MSVCR80D.dll
我在安装了 VS2005 的 Windows 7 上使用 DialogBlocks 构建了 wxWidgets 应用程序。构建成功,但可执行文件未运行,并显示消息:“程序无法启动,因为您的计算机中缺少 MSVCR80D.dll”。在 Visual Studio 中构建的相同代码是可以的。构建日志:
----------------------- Configuration: VC++ Debug ----------------------- In directory: C:\Users\alexm\Documents\DialogBlocks Projects\Test1 nmake /nologo -f makefile.vc CONFIG=debug clean all if exist VCDebug\*.obj del VCDebug\*.obj if exist VCDebug\*.res del VCDebug\*.res if exist VCDebug\Test11.exe del VCDebug\Test11.exe if exist VCDebug\Test11.ilk del VCDebug\Test11.ilk if exist VCDebug\Test11.pdb del VCDebug\Test11.pdb cl.exe /c /nologo /TP /FoVCDebug\mainframe.obj /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /Zi /MDd /Od /GR /EHsc /W4 /I"C:\wxWidgets-2.8.10/include" /I"C:\wxWidgets-2.8.10/contrib/include" /I"C:\wxWidgets-2.8.10/lib/vc_lib/mswd" /I"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\include" /I"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\include" mainframe.cpp mainframe.cpp cl.exe /c /nologo /TP /FoVCDebug\test11app.obj /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /Zi /MDd /Od /GR /EHsc /W4 /I"C:\wxWidgets-2.8.10/include" /I"C:\wxWidgets-2.8.10/contrib/include" /I"C:\wxWidgets-2.8.10/lib/vc_lib/mswd" /I"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\include" /I"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\include" test11app.cpp test11app.cpp rc.exe /foVCDebug\Test11.res /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /I "C:\wxWidgets-2.8.10/include" /I "C:\wxWidgets-2.8.10/contrib/include" /I "C:\wxWidgets-2.8.10/lib/vc_lib/mswd" /I "C:\Program Files (x86)\Microsoft Visual Studio 8\vc\include" /I "C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\include" Test11.rc link.exe /OUT:VCDebug\Test11.exe /LIBPATH:"C:\wxWidgets-2.8.10/lib/vc_lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /DEBUG VCDebug\mainframe.obj VCDebug\test11app.obj VCDebug\Test11.res wxmsw28d_richtext.lib wxmsw28d_aui.lib wxmsw28d_html.lib wxmsw28d_xrc.lib wxmsw28d_core.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxmsw28d_adv.lib wxmsw28d_html.lib wxmsw28d_xrc.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib link.exe /OUT:VCDebug\Test11.exe /LIBPATH:"C:\wxWidgets-2.8.10/lib/vc_lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /DEBUG @C:\Users\alexm\AppData\Local\Temp\nmB05C.tmp Done. 0 errors, 0 warnings
清单文件:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?> <assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'> <dependency> <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /> </dependentAssembly> </dependency> <dependency> <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*' /> </dependentAssembly> </dependency> <dependency> <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /> </dependentAssembly> </dependency> </assembly>
我可以更改一些编译器/链接器标志,或者在我的计算机上进行一些更改,以允许此可执行文件运行吗?
I build wxWidgets application with DialogBlocks on Windows 7 with VS2005 installed. Build is successful, but executable doesn't run giving the message: "The program can't start because MSVCR80D.dll is missing from your computer". The same code built in Visual Studio is OK. Build log:
----------------------- Configuration: VC++ Debug ----------------------- In directory: C:\Users\alexm\Documents\DialogBlocks Projects\Test1 nmake /nologo -f makefile.vc CONFIG=debug clean all if exist VCDebug\*.obj del VCDebug\*.obj if exist VCDebug\*.res del VCDebug\*.res if exist VCDebug\Test11.exe del VCDebug\Test11.exe if exist VCDebug\Test11.ilk del VCDebug\Test11.ilk if exist VCDebug\Test11.pdb del VCDebug\Test11.pdb cl.exe /c /nologo /TP /FoVCDebug\mainframe.obj /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /Zi /MDd /Od /GR /EHsc /W4 /I"C:\wxWidgets-2.8.10/include" /I"C:\wxWidgets-2.8.10/contrib/include" /I"C:\wxWidgets-2.8.10/lib/vc_lib/mswd" /I"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\include" /I"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\include" mainframe.cpp mainframe.cpp cl.exe /c /nologo /TP /FoVCDebug\test11app.obj /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /Zi /MDd /Od /GR /EHsc /W4 /I"C:\wxWidgets-2.8.10/include" /I"C:\wxWidgets-2.8.10/contrib/include" /I"C:\wxWidgets-2.8.10/lib/vc_lib/mswd" /I"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\include" /I"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\include" test11app.cpp test11app.cpp rc.exe /foVCDebug\Test11.res /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /I "C:\wxWidgets-2.8.10/include" /I "C:\wxWidgets-2.8.10/contrib/include" /I "C:\wxWidgets-2.8.10/lib/vc_lib/mswd" /I "C:\Program Files (x86)\Microsoft Visual Studio 8\vc\include" /I "C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\include" Test11.rc link.exe /OUT:VCDebug\Test11.exe /LIBPATH:"C:\wxWidgets-2.8.10/lib/vc_lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /DEBUG VCDebug\mainframe.obj VCDebug\test11app.obj VCDebug\Test11.res wxmsw28d_richtext.lib wxmsw28d_aui.lib wxmsw28d_html.lib wxmsw28d_xrc.lib wxmsw28d_core.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxmsw28d_adv.lib wxmsw28d_html.lib wxmsw28d_xrc.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib link.exe /OUT:VCDebug\Test11.exe /LIBPATH:"C:\wxWidgets-2.8.10/lib/vc_lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /DEBUG @C:\Users\alexm\AppData\Local\Temp\nmB05C.tmp Done. 0 errors, 0 warnings
Manifest file:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?> <assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'> <dependency> <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /> </dependentAssembly> </dependency> <dependency> <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*' /> </dependentAssembly> </dependency> <dependency> <dependentAssembly> <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /> </dependentAssembly> </dependency> </assembly>
Can I change some compiler/linker flags, or make some change on my computer, to allow this executable to run?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
情况是编译器
cl.exe
已提供了/MDd
标志,告诉他链接到共享库版本。尝试使用/MTd
代替。如果 wxWidgets 库是使用共享运行时构建的,则可能会出现此问题。通常不允许您使用不同版本的 vc 运行时构建项目。在这种情况下,您可以探索 wxWidgets 是否提供使用静态运行时构建的库。他们经常这样做。
只是要明确一点。如果二进制文件是使用不同版本的 vc 运行时编译的,则不允许将二进制文件链接到库和对象文件。在我的机器上,我安装了 MSVS 2005,但 CRT 调试运行时的版本略有不同。
< assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50608.0"processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b" />
一个可能的原因是您另一方面,库作者已经安装了 MSVS 2005 SP1。
HTH。
The case is that compiler
cl.exe
have been provided with/MDd
flag that tells him to link against shared library versions. Try/MTd
instead.The problem might have been arisen because of wxWidgets libraries if they were built with shared runtime. Usually you are not permitted to build projects with different versions of vc runtime. In that case you could explore whether wxWidgets provides libs built with static runtime or not. Often they do.
Just to be clear. You are not permitted to link binaries against libraries and objects files if they were compiled involving different versions of vc runtime. On my machine i've got MSVS 2005 but i've got slightly different version of CRT debug runtime.
<assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b" />
One possible reason is that you either on the other hand library authors have had MSVS 2005 SP1 installed.
HTH.