在 Vista (SP2) 64 位上:为什么我的 C/C++运行时 (CRT) 程序集缓存对我的应用程序不可见?
各位 VC++ 和 WIndows 专家大家好! ;)
首先,我的背景:Vstudio、C & C++、Windows。(如果你愿意的话,你可以和我一起了解技术)。 经过 5 天的尝试各种可能性、论坛和修复,甚至更改操作系统平台后,我决定在这里发帖(或跳出窗口!)我正在努力解决这个问题,因为它是阻碍了我的实际开发工作! 。 :)
Soo.. sceratio 是: 出现问题的开发机器: 操作系统:带有 SP2 的 Windows Vista 64 位(即使在使用 VMWare 运行的 32 位 XP SP2 虚拟机上也出现相同的问题)。 开发IDE:安装了SP1的Visual Studio 2008。 输出二进制类型:.DLL(它的命运是成为名为 RealStudio 的开发 IDE 的插件)
问题: 我正在使用 VStudio 2008 开发一个 32 位 C++ DLL。它包括一个相当大的 C++ 库,称为 ASDCP(用于音频/视频编解码器处理) - 它是用 PURE C++ 编写的,具有完整的内置支持用于在 Win32、Linux、MacOS 等上构建。
现在 ASDCP 库使用 C++ 标准库(存储在 MSVCP90.dll 和 .lib 文件中)。 因此,当我构建自己的插件(DLL)并允许它的调用应用程序(称为 RealStudio,另一个开发 IDE)时,无需 ASCP 库(因此不需要链接 C++ 标准库),它可以正常工作。 但是当我从 ASDCP 库添加代码,并选择 STATIC Link(/MT) C++ 运行时库,然后加载插件并运行 RealStudio 时,它会因内存泄漏而崩溃 - 可能是“访问冲突” -可能是由于各个 DLL 之间的不匹配造成的。
现在,我对这篇文章的问题是,当我在 VStudio 2008 中动态链接 CRT,然后尝试通过 rnnign RealStudio 加载插件时,该死的事情就是无法找到 Microsoft.CRT 的并排大小汇编缓存.VC90!!我已经处理了所有清单文件,将清单文件嵌入到 DLL 中,检查了(大约 10 次!)WinSxs 程序集缓存中的 CRT 版本,以满足我的清单文件/依赖项需求。
但不知何故...... RealStudio(RunAs Admiistrator)无法加载我的CRT 9 DLL(特别是MSVCP90.dll)。我花了大约 15 个小时在 MSDN 和其他论坛上寻找类似的问题和解决方案,并实施了 Microsoft 论坛版主推荐的解决方案。但无济于事。
那么.. 如何获得在 64-Windows(Vista SP2) 下运行的 32 位 C++ DLL,以“查看”相关 CRT 依赖项的 Assembl 缓存并加载它???
帮助!?!?!拜托……
提前深深感谢您帮助我再次变得理智!
迪内什
hi to all VC++ and WIndows experts! ;)
Firstly, my background: Vstudio, C & C++, Windows.(so you can get techy with me, if u want).
After 5days of trying all kinds of possibilities, and forums and fixes and even changing O/S platforms , I've decided to post here(or jump out of a window!) I'm in AGONy trying to solve this issue, as it's holding up my actual development work!! . :)
Soo.. sceratio is:
Development machine where problem is occurring:
OS: Windows Vista 64-bit with SP2 (even though identical problem occurring on an 32-bit XP SP2 virtual machine , running using VMWare.
Development IDE: Visual Studio 2008 with SP1 installed.
Output Binary type: .DLL (it's destiny is to becomea plug-in for a a dev. IDE caled RealStudio)
Issue/Problem:
I'm developing a 32-bit C++ DLL uing VStudio 2008. It is to include a rather medium-large C++ library called ASDCP(used for audio/video codec processing ) - which is written in PURE C++ and has full built-in support for building on Win32, Linux, MacOS etc.
Now the ASDCP library utilises the C++ Standard library(stored in MSVCP90.dll and.lib files).
So, when I build my own plug-in(DLL), and allow it's caller app(called RealStudio, another development IDE), WITHOUT the ASCP library(and hence no need for C++ Std. Libs being linked in), it works fine.
but when I add the code from the ASDCP library, and choose to STATIC Link(/MT) the C++ runtime libraries, and then load up the plugin and run up RealStudio, it's bominb out with a memory leak- probably "Access violation" - probably caused by some mismatch between the various DLLs.
Now, my question for this post is, when I dynamically link the CRT in VStudio 2008, and then try and load the plugin by rnnign RealStudio- the damn thing simply is unable to find the Side-by-Size ASSEMBLY CACHE for Microsoft.CRT.VC90!! I have worked with all the manifest files, embedded the manifest file in to the DLL, checked (about 10 times!) versions of the CRTs in the WinSxs Assembly cache, aganst my manifest file/dependancy needs.
But somehow...... RealStudio(RunAs Admiistrator) is unable to LOAD my CRT 9 DLLs(MSVCP90.dll in particular). I've spent aboutr 15 hours on MSDN and other forums looking at smilar issues and solutions, AND impleented the solutions as receommended by Microsoft's forum moderators. but to no avail.
So.. HOW do you get a 32-bit C++ DLL, running under 64-Windows(Vista SP2), to "see" the Assembl cache for the relevant CRT dependacy and load it up??????
HELP!?!?! pleasee..
Deep gratitude in advance for helping me become sane again!
Dinesh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为平台目标 x86 构建托管项目。
我的意思是,不要为“任何 CPU”构建它。
build your managed project for platform target x86.
I mean, don't build it for "Any CPU".