几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-05-07, 03:16 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】runtime Dll Not Found

runtime dll not found
runtime dll not found
we recently migrated to vs2008 and are now linking to dwgdirect 2.05.01 dll's.
everything links ok, but when i try executing i get the warning "unable to locate component" - "the application has failed to start because msvcr90.dll was not found." definitely this dll is installed on my machine as i have visual c++ (and i double-checked the winsxs folder).
i've read about unmanaged assemblies here:
are the necessary libraries referenced in your application manifest?
vladimir
here's the complete history:
previously we were developing with vs2002 and linking to the dwgdirect static libraries dd_vc2002md. we upgraded dev env to vs2008 and everything rebuilt and ran ok when still linking to vc2002 libs.
now we wish to add support for dgn, so at the same time i thought to remove the dwgdirect static linking and go with the dwgdirect dll version.
so i changed the link input dependancies to dd_root_dll.lib, etc. and added the dd_root_2.05_9.dll, etc to our application's bin folder.
the project links ok. at run-time, in the ide output window, dll's are loaded until reaching dd_alloc_2.05_9.dll when the error message "the application failed to start because msvcr90.dll was not found" is reported.
that's how i came to looking into manifests. our exe and dll projects automatically generate manifests and embed them.
do i need to somehow add manifests for the dwgdirect dll's to explicitly identify their dependancy on the msvcr runtime? or is there a simple solution to this?
note that i get the same result for msvcr80 when switching all dwgdirect dll's and references to the vc8 library.
any suggestions?
thanks,
erle
perhaps you are linking release dd libraries to debug version of your app?
vladimir
i was linking with the release versions when in debug mode in the ide.
i've relinked now with the debug versions and added the debug dll's to my bin folder.
the error message changed slightly to:
"the application failed to start because msvcr90d.dll was not found".
what does your application manifest look like?
vladimir
currently i'm linking to the vc8 debug libraries and i'm getting error "unable to find msvcr80d.dll".
the manifest for my application (terrain_32.exe.intermediate.manifest):
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestversion='1.0'>
<trustinfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedprivileges>
<requestedexecutionlevel level='asinvoker' uiaccess='false' />
</requestedprivileges>
</security>
</trustinfo>
<dependency>
<dependentassembly>
<assemblyidentity type='win32' name='microsoft.vc90.debugcrt' version='9.0.21022.8' processorarchitecture='x86' publickeytoken='1fc8b3b9a1e18e3b' />
</dependentassembly>
</dependency>
<dependency>
<dependentassembly>
<assemblyidentity type='win32' name='microsoft.vc90.debugmfc' version='9.0.21022.8' processorarchitecture='x86' publickeytoken='1fc8b3b9a1e18e3b' />
</dependentassembly>
</dependency>
</assembly>
the manifest for my dll that links to many dd dll's (dwg.dll.intermediate.manifest):
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestversion='1.0'>
<trustinfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedprivileges>
<requestedexecutionlevel level='asinvoker' uiaccess='false' />
</requestedprivileges>
</security>
</trustinfo>
<dependency>
<dependentassembly>
<assemblyidentity type='win32' name='microsoft.vc90.debugcrt' version='9.0.21022.8' processorarchitecture='x86' publickeytoken='1fc8b3b9a1e18e3b' />
</dependentassembly>
</dependency>
<dependency>
<dependentassembly>
<assemblyidentity type='win32' name='microsoft.vc90.debugmfc' version='9.0.21022.8' processorarchitecture='x86' publickeytoken='1fc8b3b9a1e18e3b' />
</dependentassembly>
</dependency>
<dependency>
<dependentassembly>
<assemblyidentity type='win32' name='microsoft.vc80.debugcrt' version='8.0.50727.762' processorarchitecture='x86' publickeytoken='1fc8b3b9a1e18e3b' />
</dependentassembly>
</dependency>
</assembly>
my terrain_32 exe is linking to 3 dd dll's (dd_root, dd_alloc, dd_gi) but the vc80 dependancy is not in it's manifest!
so i need to add that dependancy to terrain_32.exe somewhere!
i tried editing the intermediate.manifest directly, but it gets overwritten at build time. what's the correct way to add this dependancy?
thanks for all your help!
why wouldn't you just use the same version of dd dlls that match your c runtime version?
(v.9 in that case)
vladimir
strangely enough (or not strangely at all) the error message about not finding runtime - whether it be v8 or v9 - has stopped happening. i did a complete clean and rebuild around the time it stopped happening, so i'll chalk it up to the first rule of programming, which is "when in doubt, clean and rebuild the whole solution".
so the next error i encountered was after all dll's successfully loaded, an unhandled exception (null pointer) at the call to odinitialize, which is the first call to the dd library. the code there hasn't changed, the only difference is it used to be static linked and now it is linked to dd dll's. so i assume it's just me not knowing how to properly set up the dynamic library. at that point i gave up trying to use the dynamic library and went back to static linking and it's now working, except for some odd warnings which i will start a new thread on.
thanks for your help and patience!
cheers,
erle
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】linking in dll yang686526 DirectDWG 0 2009-05-06 05:07 PM
【转帖】error while linking using mfc static library vc 96.00 yang686526 DirectDWG 0 2009-05-05 09:49 AM
【转帖】dll学习(资料收集) huangyhg vc编程 0 2008-05-17 09:24 PM
最难清除木马 Dll木马揭秘 huangyhg vc编程 0 2007-04-12 07:31 PM
regsvr32.exe的使用 cam 论坛管理 0 2007-02-27 11:07 PM


所有的时间均为北京时间。 现在的时间是 02:33 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多