高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|